Is this a bug/missing feature on waffle? or I'm missing some config in somewhere?
P.S. The purpose of this is that I have to give this flag status to a FrontEnd app to show or hide some visual components depending on the flag's status.
I've tried mixing configs on django admin, and settings.py, and the expected result is that the waffle_status endpoint returns True if the user who made the request is in the added ones on the flag config, otherwise has to return False
UPDATE1: I did clone the repo of the django-waffle project and I wrote this test:
Then I ran the django server on the project, I did create a flag and bind a user to it. I did tests using postman and I get the same issue as described above.
Doing some debug on the waffle_status view on waffle-django package, I saw that the request returned has no user, I meant if I dig into request.user i saw AnonymousUser so, what I'm missing here?
I have created this flag:
I'm trying to get the flag status using the
waffle_status
endpoint, but no matter if the user is logged or not I get the same response:It is supposed that I have to get this flag as True for the user farid, the one with id 1, isn't?
I made this exercise using django 4, django-waffle 4.1.0, and I have made this configs on settings.py
and in project's url.py file
Is this a bug/missing feature on waffle? or I'm missing some config in somewhere?
P.S. The purpose of this is that I have to give this flag status to a FrontEnd app to show or hide some visual components depending on the flag's status.
I've tried mixing configs on django admin, and settings.py, and the expected result is that the
waffle_status
endpoint returnsTrue
if the user who made the request is in the added ones on the flag config, otherwise has to returnFalse
UPDATE1: I did clone the repo of the django-waffle project and I wrote this test:
It passed successfully!
Then I ran the django server on the project, I did create a flag and bind a user to it. I did tests using postman and I get the same issue as described above.
Doing some debug on the
waffle_status
view on waffle-django package, I saw that the request returned has no user, I meant if I dig intorequest.user
i sawAnonymousUser
so, what I'm missing here?