Fix regression in service overview access behavior
When the service overview was introduced, it was meant to be optional. Thus if the SERVICES config option was empty (the default), uffd returned 404. Commit fa67bde0 (Migrate OAuth2 and API clients to database) introduced the regression that accessing the service overview page when no services are visible based on the permissions of the current user (or guest if not logged in), 404 is returned. This change fixes the regression and further changes the behavior to improve consistency. Since fa67bde0, the page is relevant to admin users regardless of the SERVICES config option. Therefore uffd asks for login or reports missing permissions in all cases it originally returned 404.
Showing
- tests/test_services.py 53 additions, 2 deletionstests/test_services.py
- tests/utils.py 3 additions, 0 deletionstests/utils.py
- uffd/service/templates/service/overview.html 1 addition, 1 deletionuffd/service/templates/service/overview.html
- uffd/service/views.py 31 additions, 21 deletionsuffd/service/views.py
Please register or sign in to comment