Skip to content

Add swh.web.admin django application wrapping django admin site

Antoine Lambert requested to merge anlambert/swh-web:django-admin-views into master

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.

image

image

image

image

image

Merge request reports