Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

Allow conditions to apply to all, except blacklisted entries #53

Merged
merged 5 commits into from
Dec 18, 2013

Conversation

amandasaurus
Copy link
Contributor

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.

@amandasaurus
Copy link
Contributor Author

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.

@akaihola
Copy link
Contributor

This doesn't seem to make the "not Anonymous" condition work correctly. See my comment in #38 (comment)

@akaihola
Copy link
Contributor

Ignore my comment above, it works just fine. See the other comment in #38 (comment)

Fluxx added a commit that referenced this pull request Dec 18, 2013
Allow conditions to apply to all, except blacklisted entries
@Fluxx Fluxx merged commit 0d518ff into disqus:master Dec 18, 2013
@robgolding
Copy link
Contributor

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 #105).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants