Bradford Smith
unread,Jan 23, 2012, 4:00:37 PM1/23/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cant...@googlegroups.com
I'm new to authorization in rails. Would cantango be a good fit for my situation:
1) I need the ability to assign users to roles. user1 may have rw permissions on Model1, r permissions on Model2. user2 may have r permissions on Model1 and Model2.
2) This assignment needs to take place in a relational database.
3) I want to make the admin's life easier and allow them to create templates for roles. So, for example, Model1 rw and Model2 r could be called PermissionSet1 and Model1 r and Model 2 r could be called PermissionSet2. And the admin could then create user5 with PermissionSet1, and the user would be assigned to all roles defined for PermissionSet1.
4) If user.admin == true, then the user has permissions to everything,
5) User's are assigned to locations. For example, user1 is assigned to stores store1 and store2. I only want user1 accessing store1 and store2 data. Not sure if this is a role issue or if it's just something I need to handle in the application, outside of the roles.
So, can cantango do all of these items? If so, how would using cantango make this simpler than just using cancan?
Thanks,
Braford