-
- Downloads
auth: Map Keycloak user permissions to Django ones
Keycloak user permissions are named Roles in Keycloak semantics. Extract them from each decoded access token and override methods from django.contrib.auth.models.PermissionsMixin in order to manipulate them as Django user permissions. Closes T2247
parent
e926cadb
No related branches found
No related tags found
Showing
- swh/web/auth/backends.py 5 additions, 0 deletionsswh/web/auth/backends.py
- swh/web/auth/models.py 38 additions, 1 deletionswh/web/auth/models.py
- swh/web/tests/auth/keycloak_mock.py 16 additions, 4 deletionsswh/web/tests/auth/keycloak_mock.py
- swh/web/tests/auth/sample_data.py 27 additions, 0 deletionsswh/web/tests/auth/sample_data.py
- swh/web/tests/auth/test_backends.py 37 additions, 4 deletionsswh/web/tests/auth/test_backends.py
Loading
-
Some references in the commit message have been migrated:
- T2247 is now #2247 (closed)
Please register or sign in to comment