-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Comments
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. |
I took a longer look at the rolify, not quite sure what it provides without installing it and testing it. |
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. |
+1 This would be exactly what I need! :) |
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. |
👍 |
Not sure if I follow correctly, but would this satisfy a mult-tenant situation, ie, using 'tenant_id' column? |
+1 |
1 similar comment
+1 |
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. |
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. |
+1 |
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/
The text was updated successfully, but these errors were encountered: