fix(admin): protect administrator access
CI and Deploy / test (pull_request) Failing after 4m31s
CI and Deploy / deploy (pull_request) Has been skipped

Reject final-admin demotion and deletion at the API boundary. Require explicit confirmation before any administrator role removal.
This commit is contained in:
cesnimda
2026-08-15 13:11:54 +02:00
parent 896746319b
commit 15e5464da7
9 changed files with 411 additions and 45 deletions
+20
View File
@@ -527,6 +527,16 @@ export const translations = {
adminUsersAdminNo: "Admin: No",
adminUsersDeleteConfirmBody: "Delete this user?",
adminUsersDeleteConfirmNamed: "Delete user {name}?",
adminUsersYou: "You",
adminUsersMakeAdmin: "Make admin",
adminUsersRemoveAdmin: "Remove admin",
adminUsersDemoteTitle: "Remove administrator access",
adminUsersDemoteWarning: "Remove administrator access from {name}? They will immediately lose access to administration features.",
adminUsersSelfDemoteTitle: "Remove your own administrator access?",
adminUsersSelfDemoteWarning: "You will immediately lose access to user management and all other administration features. Another administrator must restore the role for you.",
adminUsersDeleteSelfWarning: "Delete your own account? You will be signed out and permanently lose access to this account and its data.",
adminUsersLastAdminHelp: "The final administrator cannot be demoted or deleted. Make another user an administrator first.",
adminUsersSafetyNotice: "The final administrator is protected. Removing your own administrator role requires explicit confirmation.",
adminUsersPassword: "Password",
kanbanHint: "Drag cards between columns to move a job forward. Use the card menu to set an exact stage.",
kanbanDropHere: "Drop here",
@@ -1658,6 +1668,16 @@ export const translations = {
adminUsersAdminNo: "Admin: Nei",
adminUsersDeleteConfirmBody: "Slette denne brukeren?",
adminUsersDeleteConfirmNamed: "Slette bruker {name}?",
adminUsersYou: "Deg",
adminUsersMakeAdmin: "Gjør til admin",
adminUsersRemoveAdmin: "Fjern admin",
adminUsersDemoteTitle: "Fjern administratortilgang",
adminUsersDemoteWarning: "Fjerne administratortilgang fra {name}? Brukeren mister umiddelbart tilgang til administrasjonsfunksjoner.",
adminUsersSelfDemoteTitle: "Fjern din egen administratortilgang?",
adminUsersSelfDemoteWarning: "Du mister umiddelbart tilgang til brukeradministrasjon og alle andre administrasjonsfunksjoner. En annen administrator må gjenopprette rollen for deg.",
adminUsersDeleteSelfWarning: "Slette din egen konto? Du blir logget ut og mister permanent tilgang til kontoen og dataene.",
adminUsersLastAdminHelp: "Den siste administratoren kan ikke nedgraderes eller slettes. Gjør en annen bruker til administrator først.",
adminUsersSafetyNotice: "Den siste administratoren er beskyttet. Fjerning av din egen administratorrolle krever uttrykkelig bekreftelse.",
adminUsersPassword: "Passord",
kanbanHint: "Dra kort mellom kolonnene for å flytte en jobb videre. Bruk kortmenyen for å sette et eksakt trinn.",
kanbanDropHere: "Slipp her",