Commit Graph

23 Commits

Author SHA1 Message Date
Valentin Deniaud 58dd0ae0be a2_rbac: move managers from django_rbac (#70894) 2022-11-14 12:00:15 +01:00
Valentin Deniaud 3dab8ff21a a2_rbac: move signal handlers from django_rbac (#69902) 2022-10-19 14:53:34 +02:00
Benjamin Dauvergne 43c256ee7b misc: replace deprecated ugettext by gettext (#69974) 2022-10-07 11:42:51 +02:00
Paul Marillonnet 50e48b760a discard django_rbac generic getters in main a2 code (#58695) 2021-11-26 10:04:48 +01:00
Valentin Deniaud e0b86a7691 misc: fix unused-variable pylint error (#56982) 2021-09-24 11:30:14 +02:00
Benjamin Dauvergne 34e42dacb1 misc: update import statements (#55602) 2021-07-15 12:32:26 +02:00
Valentin Deniaud 86d946adcd misc: apply isort (#52457) 2021-03-30 13:59:53 +02:00
Valentin Deniaud 4bb33d3d3c misc: apply black (#52457) 2021-03-30 11:32:55 +02:00
Benjamin Dauvergne 95b4528228 misc: remove update_roles_admins post_migrate (#48372) 2020-12-15 11:08:02 +01:00
Nicolas Roche c636b16424 a2_rbac: add manage_authorizations permission to custom_user (#46182) 2020-09-29 11:55:18 +02:00
Valentin Deniaud 3827154e76 a2_rbac: update role admins using post_migrate signal (#20513) 2020-04-24 11:08:09 +02:00
Valentin Deniaud 599555f3cb a2_rbac: add manage members permission for role admins (#20513) 2020-04-24 11:08:09 +02:00
Benjamin Dauvergne 9fbbf0519a spring cleaning (#32934)
* reorganize views and forms
* add copyright headers to all .py files
* fix all style errors reported by flake8
2019-05-14 16:19:25 +02:00
Benjamin Dauvergne 15878fbfaa manager: add a change email action on users (fixes #19716)
It's only visible for OU with the validate_emails flag.
2017-12-08 13:25:57 +01:00
Benjamin Dauvergne d5608d4eba rbac: add new operations for controling permission on user actions (fixes #16763)
The new SEARCH_OP will allow to differentiate access to listing and detail
views.
2017-06-13 19:40:07 +02:00
Benjamin Dauvergne 31a9ac2fca a2_rbac: move connection of post_migrate_update_rbac in the management module (fixes #7802)
django.contrib.contenttypes post migrate handler is connected in its
management module, which make it run always after the
post_migrate_update_rbac which need ContentType objects to have been
initialized.
2015-07-07 17:28:41 +02:00
Benjamin Dauvergne 910dfdee41 a2_rbac: do not create OU management roles when there is less than 2 OUs (fixes #7793) 2015-07-07 17:28:41 +02:00
Benjamin Dauvergne dab5d2247f a2_rbac: fix default slug for the default organizational unit (fixes #7503) 2015-06-08 18:10:25 +02:00
Benjamin Dauvergne f3279fc15a a2_rbac/signal_handlers: improve performance of post_migrate_update_rbac
- run it inside a transaction to prevent too much disk sync
- defer computive the transitive closure of the parenting relation to
  after all the admin roles have been created
2015-05-31 23:20:16 +02:00
Benjamin Dauvergne da08c5455a a2_rbac: improve creation of administrative roles
Creating admin roles for all ou on each save of a role or an ou did not
scale.
2015-05-31 02:35:54 +02:00
Benjamin Dauvergne 446a7ba1a3 a2_rbac/signal_handlers: add missing .objects accessor (fixes #7353) 2015-05-27 02:16:05 +02:00
Benjamin Dauvergne 056ae2addb signal_handlers: do not execute post_migrate signals if allow_migrate returns False
fixes #7293
2015-05-20 17:08:26 +02:00
Benjamin Dauvergne c9915b9b6d a2_rbac: integrate django_rbac in authentic2
This commit add local implementations for swappable models of the
django_rbac application. The role model gets extraneous fields to map
some roles one-to-one to permssions (admin_scope generic key field) and
to link roles to a service to make service's roles.

The admin scope allow building automatic management roles, like the
general management role for an organizational unit which inherits all
content type management roles for this ou.

refs #7252
fixes #6994
2015-05-18 21:48:41 +02:00