As designed Node Integer Permission Bug

Snog

Well-known member
Affected version
2.0.2
If you have a custom Forum permission defined as an integer and attempt to override the user group permission in Node permissions by setting that number to zero, the value is not saved and it is set back to inherit.
 
This may or may not be a bug.

Not setting the permission in the User group itself and only setting it at the Node level works fine.
 
In this context, 0 means inherit so that's not entirely unexpected.

Even so, you'd be unable to override a more permissive integer value (e.g. a higher number or unlimited) with a less permissive integer value. So if it's set to 5 on the user group, and you try to set it to 4, 3, 2 or 1 on the node for that user group, then the most permissive value (5) will be the one that takes effect. Similarly, 0 wouldn't actually mean 0 in this context, but it would just mean "Inherit" so that would also resolve to "5".
 
I'm not sure if this philosophy can be revisited or not.

But the main problem comes from a using a parent forum's user group setting rather than a direct user group setting.

IE:
--Parent Forum - Registered - Unlimited
--- Sub-Forum - Registered - 0

The way it is now, setting the Sub-Forum to 0 (zero) is not possible because it inherit's the Parent-Forum setting, and it's not a direct user group setting.

If there's a way to override that behavior for a given permission, I sure as heck can't find it and would appreciate being pointed in the right direction.
 
Last edited:
Back
Top Bottom