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

Is it possible for allow / deny on permission direction?. It is cool. #1294

Closed
chitainguyen opened this issue Dec 5, 2019 · 3 comments
Closed
Labels

Comments

@chitainguyen
Copy link

Dear Mr..,

I want a permission system like Discord.

It is same like that, but need an override way on permission direction.
Can you add it on this source too?

Thanks a lot

@drbyte
Copy link
Collaborator

drbyte commented Dec 5, 2019

I'm not sure I understand your question.

I think most of what you're talking about is something to build into your app, not into this package.

@chitainguyen
Copy link
Author

@drbyte i mean: can this package support for allow, deny on permission

@drbyte drbyte added the support label Dec 8, 2019
@drbyte
Copy link
Collaborator

drbyte commented Dec 8, 2019

This package supports assigning permissions to users/roles.

Your application can then use Laravel's Gate features to call can() and cannot() against those permissions. (There are additional functions like hasRole or hasPermissionTo, but those are more advanced.)

So, if by "deny" you mean calling $user->cannot() then yes.

But, if by "deny" you mean you want to give users a "Manager" role but then "subtract"/deny a permission that the Manager normally has, then no, this package doesn't do that.

This package does "additive" permission assignment, not subtracting.

@drbyte drbyte closed this as completed Dec 8, 2019
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

2 participants