Rails 3.1 Active Admin gem: how to manage Admin Users - ruby-on-rails-3

The question for those, who had worked with Active Admin gem:
I just don't get how should I make a sign up and change password functions for admin users? Can I do this using Active Admin interface?
Thanks in advance.

If you follow the install steps on the active admin github page, one of the steps installs devise for you, creates and admin_user table in your DB and populates it with a default user for you to login as.
See at GitHub.

Related

How to manage permissions with CanCan on namespaced web app?

I am experiencing some problems setting permissions on my Rails 3 web application. I currently use Devise and CanCan. I have a single User model, used by Devise. The roles are admin, manager and user.
My solution uses namespaces to separate administration panels.
Root (frontend)
- static pages
Manager
- administration pages for "manager" roled users.
Backend
- administration pages for "admin" roled users.
I read documentation and some tutorials but I can make it working. My problem is that CanCan checks ability with the action that the user is trying to execute on models.
So, if a user is logged as manager and has to manage his own Posts, he can do it by going on /manager/posts. But the problem is that he also can go to /backend/posts directory and can index Posts which he is not owner.
This problem happens because ability class tells that managers can index the Post model, but managers and admins, both are working on the Post model.
Is there a way to specify the namespace where the user is allowed to access, or not?
I saw there is many ways like using namespaced models (Backend::Posts Manager::Posts, using different tables)...
What is the best solution to manage permissions on a namespaced app where roles are working on same models, with Devise and CanCan?
Problem solved with this solution:
https://github.com/ryanb/cancan/wiki/Authorization-for-Namespaced-Controllers

Devise customization

I want to configure the devise gem for admin user. In my application ive installed the devise gem and currently it is used as a normal user who has account in my application. I want to add administration in my application so that an admin user can delete or modify etc operations to a particular user account and also do other administrative work such as deleting the user data which is not appropriate for public users.
I'd look into two gems: RailsAdmin and CanCan.

creating a new multi tenant app which authorization and permissions system

I am writing a new authorization system and permission system for my multi tenant rails 3 app.
I need to have guests, basic users, site owners, site owners can have users, multi site owners with users and also admin users.
I am wondering what everyone would use for this setup ?
Devise, Authlogic, Sorcery etc ?
Canacan, declarative_authorization etc ?
or any other gems that would fit better for this sort of system.
thanks a lot
Rick
I personally prefer devise with cancan. I have yet to find anything that I was not able to do with that combination.

Share login status between WordPress blog and RoR app?

I'm using devise for authentication in my Rails application. I have a WordPress installation for the blog portion of the project (because I need several WP plugins).
Is it possible to integrate the user authentication from the RoR application into the blog, so that when someone logs into the app, then goes to the blog, their signed it status remains and shows up.
If that's possible, it should also be possible for them to log in while viewing the blog and then go straight to their page when they go to the app, right?
You have to store session information about WP and Rails session in one storage and check WP auth cookies on Rails application.

How Do I Implement an Admin Role With Rails Clearance?

I want an admin role so that I can access some RESTful states while my users cannot. I'm using Clearance but there is no longer a page on their wiki for how to implement an admin role for Clearance. Does anyone have it working on Rails 3?
I've had success with Aegis. It doesn't guarantee Rails 3 compatibility but I haven't had any issues using it with Rails 3 (3.0.5).