User group condition negation behaviour across multiple groups #11444
-
What is the the intended behaviour of the "is not one of" behaviour in regards to "User Group" permissions? We have a field that is set to show when the User Group is not one of "Group B". We then have a user that is in Group A and Group B. My intuition thought that that would hide the field from that user as they are in Group B (a negated I'm not sure if this is an issue or the indeed behaviour? This "issue" came about when using Commerce's discount condition builder to exclude groups from a discount. At first I thought it was a bug with Commerce but other User Group conditions within Craft core work in the same way. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks for pointing that out! The rule was already working as expected (not matching users if any of their groups were in the exclude list) when it was used as an element index filter. And entries’ Author Group condition rules were working as expected both for index filters and when applied to an individual entry. So clearly there’s a bug here. Fixed for the next release (39a9027). |
Beta Was this translation helpful? Give feedback.
Thanks for pointing that out!
The rule was already working as expected (not matching users if any of their groups were in the exclude list) when it was used as an element index filter. And entries’ Author Group condition rules were working as expected both for index filters and when applied to an individual entry. So clearly there’s a bug here. Fixed for the next release (39a9027).