-
- Downloads
Add swh.web.admin django application wrapping django admin site
Enable to use django administration site in swh-web by including "swh.web.admin" application in swh_extra_django_apps list from swh-web configuration. When enabled, the admin site is available through the new /manage/ endpoint. It allows an user to modify some django models of interest (adding, deleting or modifying rows) if he/she has adequate permissions to do so. Currently, only the add forge now request and save code now request models can be managed with the admin site through the use of the following permissions: - swh_web_add_forge_now.add_request - swh_web_add_forge_now.change_request - swh_web_add_forge_now.delete_request - swh_web_add_forge_now.view_request - swh_web_save_code_now.add_saveoriginrequest - swh_web_save_code_now.change_saveoriginrequest - swh_web_save_code_now.delete_saveoriginrequest - swh_web_save_code_now.view_saveoriginrequest When swh-web is using the default django authentication backend, the admin site also enables and administrator to manage user accounts and their permissions. When swh-web is using Keycloak as the authentication backend, the permissions listed above must be added as swh-web client roles and these roles can then be set for an user through the Keycloak admin console in order to use the features offered by the admin site.
Showing
- swh/web/admin/__init__.py 6 additions, 0 deletionsswh/web/admin/__init__.py
- swh/web/admin/apps.py 11 additions, 0 deletionsswh/web/admin/apps.py
- swh/web/admin/templates/admin/base_site.html 59 additions, 0 deletionsswh/web/admin/templates/admin/base_site.html
- swh/web/admin/tests/__init__.py 0 additions, 0 deletionsswh/web/admin/tests/__init__.py
- swh/web/admin/tests/test_app.py 25 additions, 0 deletionsswh/web/admin/tests/test_app.py
- swh/web/admin/urls.py 43 additions, 0 deletionsswh/web/admin/urls.py
- swh/web/config.py 1 addition, 0 deletionsswh/web/config.py
- swh/web/tests/test_urls.py 2 additions, 2 deletionsswh/web/tests/test_urls.py
- swh/web/urls.py 3 additions, 3 deletionsswh/web/urls.py
- swh/web/webapp/urls.py 4 additions, 1 deletionswh/web/webapp/urls.py
swh/web/admin/__init__.py
0 → 100644
swh/web/admin/apps.py
0 → 100644
swh/web/admin/templates/admin/base_site.html
0 → 100644
swh/web/admin/tests/__init__.py
0 → 100644
swh/web/admin/tests/test_app.py
0 → 100644
swh/web/admin/urls.py
0 → 100644
Please register or sign in to comment