GSA / notifications-admin

The UI of Notify.gov
https://notify.gov
Other
11 stars 2 forks source link

Bug: Navigating directly to features page redirects to services #1942

Closed alexjanousekGSA closed 1 month ago

alexjanousekGSA commented 1 month ago

Who discovered this?

No response

What happened?

While setting up backstopJS tests, I noticed that actions regarding routing were not being performed as expected. When I navigate to one page, I keep getting directed to the services page.

Environment

staging

What pages did this appear on?

This was found locally and it appears when trying to navigate to a route besides services. http://localhost:6012/features for example.

Detail the steps for someone to reproduce

What browsers are you seeing the problem on?

Firefox, Chrome

Relevant log output

No response

alexjanousekGSA commented 1 month ago

Found where the problem is:

in the index.py on line 93ish under the features route, there is a annotation for "@user_is_logged_in", if you remove that then it works. So without the user being logged in, it redirects to services for some reason.

heyitsmebev commented 1 month ago

@alexjanousekGSA Do we need not need "@user_is_logged_in" as part of permissions?

alexjanousekGSA commented 1 month ago

Yes, we need it. I should have clarified that that is how I found the bug, the solution is not to remove the annotation!