Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable a feature for a specific actor #649

Closed
acouprie opened this issue Jul 20, 2022 · 3 comments
Closed

Disable a feature for a specific actor #649

acouprie opened this issue Jul 20, 2022 · 3 comments

Comments

@acouprie
Copy link

Hello,

I got an issue with Flipper.

We use Flipper to turn on or off features for specific customers. First we want to enable globally a feature that is ready to be used in production, and then activate or deactivate it for selected customers.

It seems that it is not possbile to deactivate a feature enabled globally, for exemple I expect the feature to be disabled only for the Organization.first while it is still for the others but it is not :

FLIPPER[:cases].enabled?
=> true

FLIPPER[:cases].enabled? Organization.first
=> true

FLIPPER[:cases].disable Organization.first
=> true

FLIPPER[:cases].enabled? Organization.first
=> true

I saw discussion about this here and here.

Will this be a feature for Flipper and if yes do you know when ? Do you suggest a workaround ?

Thank you

@acouprie
Copy link
Author

Ok, I managed a workaround by rewriting the code to never use global FLIPPER (FLIPPER[:cases].enabled?). I loop on all orgs and apply the logic I want accordingly.

@jnunemaker
Copy link
Collaborator

Hi!

Eventually I would like to add deny to flipper as well but we have a few things to get shipped before that so I don't have a timeframe for you right now.

@bkeepers
Copy link
Collaborator

@acouprie another approach is to use a group to define everyone who is allowed access.

Flipper.register(:generally_available) do |user|
  !user.banned?
end
Flipper.enable_group(:cases, :generally_available)

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

No branches or pull requests

3 participants