feat(cabana): list the administrators holding a role on the Roles form (quick-261028-rqg)

- users form partial on the Administrators tab of the role update form,
  served by rolesAdmin.PartialData through scopeAdministrators (D-03)
- deleted and deactivated holders marked, superusers only for superuser
  editors, first 100 rows with a count note, preview links for editors
  holding backend.manage_users
- en/pl phrases, README and docs, TestRolesSmoke asserts the partial
This commit is contained in:
Jakub Zych
2026-10-28 21:32:19 +01:00
parent c8a22e3e84
commit 8cb56a4c51
8 changed files with 164 additions and 1 deletions

View File

@@ -186,6 +186,7 @@ Settings → System → Roles (`summercms.cabana.roles`, `cabana.RolesController
- **System roles** are the roles with `is_system` set (the seeded developer and publisher roles) and every role whose code plugins grant permissions to through `pact.Permission` `Roles`. Their code cannot be changed and they cannot be deleted; name, description and stored grants stay editable. A role created on this screen is never a system role. The grants plugins declare in code are merged with the stored ones when an administrator signs in, so they apply whether or not they are stored. The role's editor shows them checked and locked, with the note that a plugin grants them; a save keeps them as stored.
- An administrator who is not a superuser cannot grant more than they hold: permissions they lack are locked in the role's editor, so they can neither add nor remove them on any role.
- A role that any administrator holds, deleted administrators included, cannot be deleted; the refusal names the role and how many administrators hold it. Give them another role first. A refused role in a bulk delete rolls back the whole selection.
- The Administrators tab of a saved role lists the administrators who hold it, with login, first name, last name and email, sorted by login. It is read-only: roles are assigned on the Administrators form. Superusers appear only to an editor who is a superuser; deleted and deactivated administrators are listed and marked, so the list matches the count of the delete refusal. Up to 100 administrators are shown, with a note giving the total beyond that. For an editor who also holds `backend.manage_users` (`cabana.PermissionManageUsers`), each login opens that administrator's preview.
### Operator commands