Users inheriting permissions from a relationship #1736
-
So we've got a fairly standard SAAS app with the usual roles; The issue comes when we want to apply different sets of permissions to each corporation. Now; the easy way to do this would, of course, be to have a different role for each corporation, but that's ugly, as we already have a The issue, as I'm sure you've gathered by now, is that if I ask I'm assuming that this is something that could be done through Any thoughts, comments, ideas or previous work I could look at for inspiration? Any suggestions would be much appreciated before I start spending hours running down the wrong rabbit hole! Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The |
Beta Was this translation helpful? Give feedback.
The
can()
functionality is indeed provided viaGate::before()
in thePermissionRegistrar
.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.