What does "Depends on Permission ID" do and when should it be used?

rugk

Active member
The setting "depends on permission ID" is a setting in the permission definitions. So lets take this example:
examplePermission.webp


So I already saw what it does not seem to do:
  1. The permission interface does not show in any way that the one permission depends on another one.
  2. It does not show a warning or something similar when example_createexample is set to "Never", but example_showexample is set to "Allow".
    Users can get confused when they want to allow "showing of an example text", but they forget to set allow for "creating example text".
But as far as I tested it evaluates the permission correctly, so when example_createexample is set to "Never" and example_showexample to "Allow" example_showexample still evaluates to false, but this does not happen when example_createexample is set to "Not set".

So is this correct and are the limitation (things it does not do) wanted?
When should this setting be used?
 

Attachments

  • upload_2016-2-27_15-43-22.webp
    upload_2016-2-27_15-43-22.webp
    18.4 KB · Views: 5
Essentially, when the final values are checked, if the "parent" permission is no/false, then the "child" permission will be forced to no/false. This is only done at the final calculation stage. If you have a not set and an allow across 2 groups, your final value is yes/true, so it won't apply.

The purpose is mostly simplification/extra sanity checks in code to prevent a nonsensical situation. Only use it if there's a true dependency.
 
Top Bottom