Shield - Permission constraint? |
Hi all,
currently my project is using a custom built authorization system. I am considering implementing Shield instead. However the way I need permissions is slightly different from Shield. I could summarize to say that I also need a constraint of some sort. Let me give an example. Example permissions: child-basic:ch:r, child-sensitive:nh:w, ... Permission structure:
child-basic.read, child-sensitive.write, etc... I could, of course, generate a permission for every constraint like child-basic.read-ch or so, but my relation Ids are somewhat dynamic. I could however update the list of permissons Then I would may be write my own can function: PHP Code: function customCan($permission, $child): bool{ What would be your suggestions for the best practice? |
Welcome Guest, Not a member yet? Register Sign In |