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

is_active_for_user() doesn't respect flag.everyone #401

Closed
alexrudy opened this issue Jun 24, 2021 · 1 comment · Fixed by #491 · May be fixed by #498
Closed

is_active_for_user() doesn't respect flag.everyone #401

alexrudy opened this issue Jun 24, 2021 · 1 comment · Fixed by #491 · May be fixed by #498

Comments

@alexrudy
Copy link

This was surprising to me – is_active_for_user() is exposed as a public API function, so I thought it would handle flag.everyone, but it doesn't respect that setting. That makes sense to me for _is_active_for_user() (which happens after the check on .everyone in is_active(), but makes for unexpected behavior when trying to use flags outside of a request context (where is_active_for_user() feels like the right API to use...

I would expect there to be a simple way to check if a flag is active without a request (e.g. in a celery task) but instead I have to ensure that I check the .everyone field separately. Is this intended? Could the API be changed so that is_active_for_user() resepects .everyone?

@jezeniel
Copy link

Yes should this be implemented?

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