diff --git a/authentic/resync-roles.py b/authentic/resync-roles.py new file mode 100644 index 0000000..0a27524 --- /dev/null +++ b/authentic/resync-roles.py @@ -0,0 +1,9 @@ +# authentic2-multitenant-manage tenant_command runscript resync-roles.py (--all-tenants) + +from hobo.agent.authentic2.provisionning import Provisionning +from django_rbac.utils import get_role_model + +Role = get_role_model() +engine = Provisionning() +ous = {ou.id: ou for ou in engine.OU.objects.all()} +engine.notify_roles(ous, Role.objects.all(), full=True)