Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymorphic permissions #4

Open
atrauzzi opened this issue Mar 20, 2013 · 12 comments
Open

Polymorphic permissions #4

atrauzzi opened this issue Mar 20, 2013 · 12 comments
Labels

Comments

@atrauzzi
Copy link

Might be nice to be able to have permissions specified against multiple types of data.

Either by class (id column is null), or instance (id column is not null).

Also global permissions are possible by having both class and id as null.

See this rails package for an idea as to how useful it can be: http://eppo.github.com/rolify/

@andrew13
Copy link
Collaborator

Very interesting idea and thanks for the link to the rolify. I'll review it and see what can be added without making it too complicated.

@andrew13
Copy link
Collaborator

I took a longer look at the rolify, not quite sure what it provides without installing it and testing it.

@andrew13
Copy link
Collaborator

I think I see what you mean. Be able to specify a role or permission against a specific class or object. I think thats a really neat idea, but I think it's beyond the scope of entrust at the moment.

@nicodemuz
Copy link

+1

This would be exactly what I need! :)

@phazei
Copy link

phazei commented Jul 24, 2014

That would be great. Currently building a CMS that manages multiple sites. Users will have a edit permission but only for a particular site, or multiple sites for example. This feature would be really useful.

@carcinocron
Copy link

👍

@dambridge
Copy link

Not sure if I follow correctly, but would this satisfy a mult-tenant situation, ie, using 'tenant_id' column?

@adanarchila
Copy link

+1

1 similar comment
@deardooley
Copy link

+1

@deardooley
Copy link

I had a pressing need for something like this, so I went ahead and implemented it. The pull requests is #245. You will need to migrate your pivot table if you are already running this on your site. If this gets merged, I will port it to L5 as well. As I'm not using L5 at the moment, that wasn't a top priority for me, but I'm happy to give back.

@georgeboot
Copy link

I really like this idea! I searched a lot for a perfect rbac library for Laravel that does support object based permissions, and this would be it.

For me I need specific roles per event. Organisers have their own events which they can edit, but moderators get assigned to certain events, on which they need to perform certain tasks. Having a way of combining permissions with objects would solve this matter completely.

@ThemePlugger
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants