feat(auth)!: MxGateway canonical dashboard roles — Admin→Administrator (Task 1.7)
Standardize the dashboard role VALUE on the canonical six: Admin→Administrator (Viewer unchanged). Pure value rename via DashboardRoles.Admin constant + appsettings GroupToRole; the GatewayOptionsValidator allowed-set/message track the constant so they now require 'Administrator' or 'Viewer'. Enforcement is unchanged — Administrator authorizes exactly what Admin did. Dashboard roles are derived at login from LDAP groups via GroupToRole and are never persisted to the SQLite auth store, so no DB migration/seed change. UNTOUCHED: the separate gRPC API-key scope GatewayScopes.Admin = "admin" (lowercase) and every "admin" scope literal — a distinct data-plane system.
This commit is contained in:
@@ -8,8 +8,10 @@ public static class DashboardRoles
|
||||
{
|
||||
/// <summary>
|
||||
/// Read-write access: API-key CRUD, settings, any state-changing UI.
|
||||
/// Canonical role value (Task 1.7); formerly <c>"Admin"</c> — pure value
|
||||
/// rename, the operations this role authorizes are unchanged.
|
||||
/// </summary>
|
||||
public const string Admin = "Admin";
|
||||
public const string Admin = "Administrator";
|
||||
|
||||
/// <summary>
|
||||
/// Read-only access: all pages render but write affordances are hidden.
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
"RecentSessionLimit": 200,
|
||||
"ShowTagValues": false,
|
||||
"GroupToRole": {
|
||||
"GwAdmin": "Admin",
|
||||
"GwAdmin": "Administrator",
|
||||
"GwReader": "Viewer"
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user