Gem

Hello All,

Is there any gem for Authorising Permission based on users ?
Like Cancan is used for role based authorisation.

Thanks.

You can set permissions for every role using CanCan.

There can be multiple permissions for a single role. How to handle that?

On Tuesday, September 25, 2012 2:06:07 PM UTC+5:30, Kashif Umair L.

Hi,

Iam using the rolify gem in my project and found it to be very useful
check
this out http://eppo.github.com/rolify/

Thanks,

Can you explain with an example so that I can better solve your problem?

The purpose you want to achieve includes a huge number of if conditions.
I
can give an example but better is that you provide some scenario.

Thanks for reply.

So here is the requirement :-

I have an Admin (Admin is a role). & under Admin there are 5 users. All
users(same role as Admin) have different permissions.
Those users can be differentiated by their permissions to perform tasks.
Admin need to assign different different permissions to those 5 users.
Here implementation of giving permissions to the role Admin is
important.
How to achieve this?
An User has has_many relationship with Permission.

In CanCan, we can only define role, but not permissions.

On Tuesday, September 25, 2012 4:59:32 PM UTC+5:30, Kashif Umair L.

Yes, this makes some sense.
But this is helpful, when you have only one user per role.

Suppose you are an admin. & under Admin there are 5 sub-admins. All
sub-admins have different permissions, but role is still the Admin.
Admin need to assign different different permissions to those 5
sub-admins.
I guess this can’t be achieved through CanCan because this is a
Role-based
authorisation.

You can have 5 different roles with different permissions you want to
assign each of the admin.

It doesn’t make sense that a role has different permissions. You can
create
more roles and assign them different permissions. The purpose you are
trying to achieve will always require different roles.

Well, as per the requirement, the role is one- i.e. Admin. But
permissions
need to be different for admin users.

On Tuesday, September 25, 2012 5:59:19 PM UTC+5:30, Kashif Umair L.