Skip to content

Users inheriting permissions from a relationship #1736

Answered by drbyte
BrekiTomasson asked this question in Q&A
Discussion options

You must be logged in to vote

The can() functionality is indeed provided via Gate::before() in the PermissionRegistrar.
However, you might be able to avoid having to touch that by simply overriding the hasPermissionViaRole() trait in your user model with your own implementation which adds a check against your corporation's roles.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BrekiTomasson
Comment options

Answer selected by drbyte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants