Roles and permissions on groups
Permission management in Debusine relies on users being members of groups, and groups having roles on resources (see Permission management).
This works well, except when deciding if a user can manage the membership of a group: following this model, for each group there should be a related group with admin roles on it, but then who can manage the membership of that group?
I propose to shortcut the situation by having users to be assigned direct roles on groups, and groups alone.
Proposed changes
Change the
Group.usersManyToManyFieldto use athroughtableUserGroupAdd a
GroupRolesenum, withMEMBERandADMINentriesAdd a
rolefield toUserGroup, defaulting toMEMBERAdd a
can_managepermission predicate toGroup, granted toADMINusers and otherwise delegated to scope admins.