Add Roles to Administration, with Stalwart's permissions in every language
A role is a named set of permissions given to accounts, groups and tenants. It gets its own section under a new Access heading: every role listed with the permissions it grants once its bases are followed, and a panel to create, edit and delete one. A role builds on others and has everything they grant; a denial anywhere in the tree wins, which is how Stalwart resolves it (permissions.rs unions enabled and disabled across the tree, then subtracts). The picker is Stalwart's own list of permissions, under its headings, searchable and filterable to what is granted or set here. Each permission is not set, allowed or denied, and one that is inherited says which role it comes from. Only permissions the viewer holds can be allowed, because Stalwart refuses the rest, and a role carrying anything the viewer lacks opens read-only with no delete, because Stalwart checks a grant but not a delete. Saving sends a pointer for each permission and base role that changed. The roles Stalwart hands out by default, read from x:Authentication, say so before they are changed and cannot be deleted here; a role still in use is kept by the server, and the refusal names what uses it. The permission list is Stalwart's schema. A new route, GET /api/admin/permissions, fetches /api/schema as the signed-in account and returns only names and labels, behind the same two gates as the registry methods and held in memory for an hour. Its labels are English only, so every one of the 661 has a translation in each of the eight other languages, in its own file keyed by permission name and loaded only when Roles opens. A permission a later Stalwart adds shows its English label. A test holds every language to the 0.16.22 snapshot: nothing missing, nothing stale. The mock answers x:Role/set with the grant check, loops and in-use refusals, reads the defaults from x:Authentication, and serves the schema gzipped as the real one is. Fifty-two new strings and two plurals in all nine catalogues, and 661 permission labels with 59 headings in each of the eight translations.
This commit is contained in:
@@ -195,6 +195,58 @@ export const catalog: Catalog = {
|
||||
"Your organisation has reached the number of mailing lists it is allowed.": "Uw organisatie heeft het toegestane aantal mailinglijsten bereikt.",
|
||||
"This mailing list no longer exists. Someone may have deleted it.": "Deze mailinglijst bestaat niet meer. Iemand heeft hem mogelijk verwijderd.",
|
||||
"The server did not say whether the list was created.": "De server heeft niet gemeld of de lijst is aangemaakt.",
|
||||
"Roles": "Rollen",
|
||||
"users": "gebruikers",
|
||||
"groups": "groepen",
|
||||
"tenant administrators": "tenantbeheerders",
|
||||
"administrators": "beheerders",
|
||||
"A role needs a name.": "Een rol heeft een naam nodig.",
|
||||
"Created {name}": "{name} aangemaakt",
|
||||
"New role": "Nieuwe rol",
|
||||
"This role carries permissions yours doesn't, so you can view it but not change it.": "Deze rol heeft rechten die de uwe niet heeft, dus u kunt hem bekijken maar niet wijzigen.",
|
||||
"Your role lets you view roles but not change them.": "Met uw rol kunt u rollen bekijken, maar niet wijzigen.",
|
||||
"Stalwart gives this role by default to {kinds}. A change here reaches everyone who has it that way.": "Stalwart geeft deze rol standaard aan {kinds}. Een wijziging hier geldt voor iedereen die hem zo heeft.",
|
||||
"Builds on": "Bouwt voort op",
|
||||
"Permissions": "Rechten",
|
||||
"Stalwart gives this role by default, so it can't be deleted. Change the defaults in Stalwart's own administration first.": "Stalwart geeft deze rol standaard, dus hij kan niet worden verwijderd. Wijzig eerst de standaardwaarden in het eigen beheer van Stalwart.",
|
||||
"This role carries permissions yours doesn't.": "Deze rol heeft rechten die de uwe niet heeft.",
|
||||
"Create role": "Rol aanmaken",
|
||||
"builds on this one": "bouwt voort op deze",
|
||||
"has permissions yours doesn't": "heeft rechten die de uwe niet heeft",
|
||||
"No other roles": "Geen andere rollen",
|
||||
"A role has every permission of the roles it builds on, apart from any it or they deny.": "Een rol heeft alle rechten van de rollen waarop hij voortbouwt, behalve die hij of zij weigeren.",
|
||||
"Search permissions": "Rechten zoeken",
|
||||
"All permissions": "Alle rechten",
|
||||
"Granted": "Toegekend",
|
||||
"Set on this role": "Ingesteld op deze rol",
|
||||
"No permissions match": "Geen rechten gevonden",
|
||||
"{granted} of {total}": "{granted} van {total}",
|
||||
"Denied by {role}": "Geweigerd door {role}",
|
||||
"Granted by {role}": "Toegekend door {role}",
|
||||
"Inherit": "Overnemen",
|
||||
"Not set": "Niet ingesteld",
|
||||
"Allow": "Toestaan",
|
||||
"Deny": "Weigeren",
|
||||
"A denial wins over anything allowed, here or on a role this one builds on. You can only allow permissions you hold yourself.": "Een weigering gaat boven elke toestemming, hier of op een rol waarop deze voortbouwt. U kunt alleen rechten toestaan die u zelf hebt.",
|
||||
"Accounts, groups and other roles that use it must be moved off it first.": "Accounts, groepen en andere rollen die hem gebruiken, moeten er eerst vanaf.",
|
||||
"Delete role…": "Rol verwijderen…",
|
||||
"Deleted {name}": "{name} verwijderd",
|
||||
"Still used by {things}. Move them to another role first.": "Nog in gebruik bij {things}. Geef ze eerst een andere rol.",
|
||||
"Delete role": "Rol verwijderen",
|
||||
"It can't be undone.": "Dit kan niet ongedaan worden gemaakt.",
|
||||
"Type {name} to confirm": "Typ {name} om te bevestigen",
|
||||
"Stalwart's list of permissions could not be loaded, so permissions can't be changed here. ({reason})": "De lijst met rechten van Stalwart kon niet worden geladen, dus rechten kunnen hier niet worden gewijzigd. ({reason})",
|
||||
"Named sets of permissions, given to accounts, groups and tenants.": "Benoemde sets rechten, toegekend aan accounts, groepen en tenants.",
|
||||
"Search roles": "Rollen zoeken",
|
||||
"No roles match": "Geen rollen gevonden",
|
||||
"No roles yet": "Nog geen rollen",
|
||||
"Open {name}": "{name} openen",
|
||||
"Default for {kinds}": "Standaard voor {kinds}",
|
||||
"You can't give a role permissions your own role doesn't have.": "U kunt een rol geen rechten geven die uw eigen rol niet heeft.",
|
||||
"Your organisation has reached the number of roles it is allowed.": "Uw organisatie heeft het toegestane aantal rollen bereikt.",
|
||||
"This role no longer exists. Someone may have deleted it.": "Deze rol bestaat niet meer. Iemand heeft hem mogelijk verwijderd.",
|
||||
"the default roles": "de standaardrollen",
|
||||
"The server did not say whether the role was created.": "De server heeft niet gemeld of de rol is aangemaakt.",
|
||||
"User": "Gebruiker",
|
||||
"Administrator": "Beheerder",
|
||||
"Custom role": "Aangepaste rol",
|
||||
@@ -1591,6 +1643,8 @@ export const catalog: Catalog = {
|
||||
"Its {n} members are taken out of the group first, and lose what was shared with it. The group's own mail is removed in the background, and it can't be undone.": { one: "Het {n} lid wordt eerst uit de groep gehaald en verliest wat ermee gedeeld was. De e-mail van de groep wordt op de achtergrond verwijderd, en dit kan niet ongedaan worden gemaakt.", other: "De {n} leden worden eerst uit de groep gehaald en verliezen wat ermee gedeeld was. De e-mail van de groep wordt op de achtergrond verwijderd, en dit kan niet ongedaan worden gemaakt." },
|
||||
"{n} mailing lists": { one: "{n} mailinglijst", other: "{n} mailinglijsten" },
|
||||
"{n} recipients": { one: "{n} ontvanger", other: "{n} ontvangers" },
|
||||
"Grants {n} permissions": { one: "Kent {n} recht toe", other: "Kent {n} rechten toe" },
|
||||
"{n} roles": { one: "{n} rol", other: "{n} rollen" },
|
||||
"{n} DKIM keys": { one: "{n} DKIM-sleutel", other: "{n} DKIM-sleutels" },
|
||||
"{n} other items": { one: "{n} ander item", other: "{n} andere items" },
|
||||
// ── Administration ────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user