Allow explicitly blocking actors and groups #952
+108
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello everyone! 👋
I want to present a possible solution to the issue #514: a good way of explicitly enabling a feature with exceptions.
(It's just a draft PR to show my idea; it doesn't have any tests or documentation yet. If we decide to go ahead with this implementation, I'll do those stuff.)
Idea
My idea is to create blocking gates, and to check if a feature is enabled, there must be at least one open gate (as usual) AND no blocking gates.
Example
We have four users: two men Pepe and Juan, aged 15 and 79, and two women Mari and Cata, aged 18 and 22.
In our
config/initializers/flipper.rbwe have this:We will enable and block actors and groups, and after each action, we will execute this method to check whether the
:testfeature is enabled or not for each user:At time 0, the feature is not enabled for any user. Then, at time 1, we enable the feature for the
:teenagersgroup, and now the:testfeature is enabled for Pepe and Mari. And so on.It also works after fully enable a feature
User interface
I imagine the UI to be something like this:
