Closed amandasaurus closed 10 years ago
I have fixed & updated the failing test. The updated test shows what I believe should happen, if a switch has only one exclusion condition, then it should be active for all things that don't match that condition, and inactive for things that do match it.
This allows one to have "default on, but blacklist these condition" switches.
This doesn't seem to make the "not Anonymous" condition work correctly. See my comment in https://github.com/disqus/gargoyle/issues/38#issuecomment-12587346
Ignore my comment above, it works just fine. See the other comment in https://github.com/disqus/gargoyle/issues/38#issuecomment-12589480
I know this is a really old PR and the project doesn't get much attention anymore, but I just wanted to come back to say that this introduces a really nasty bug (raised here https://github.com/disqus/gargoyle/issues/105).
Currently, if you make a switch "selective" and then add a condition which excludes on thing (e.g. user/ip address) and add no other conditions, then one would assume that the switch will be active for all, except the user/ip address you explicitly blacklisted, and would be false for that user/ip address.
However this is not the case, instead the switch is not active for anyone.
This is from a bug in applying conditions. This patch fixes that.