fix purgatory for users
This commit is contained in:
@@ -6,6 +6,7 @@ export type Permission =
|
||||
| "clients:control"
|
||||
| "clients:view"
|
||||
| "clients:build"
|
||||
| "clients:enroll"
|
||||
| "audit:view";
|
||||
|
||||
export function checkPermission(
|
||||
@@ -75,6 +76,8 @@ export function getPermissionDescription(permission: Permission): string {
|
||||
return "View connected clients";
|
||||
case "clients:build":
|
||||
return "Build client binaries";
|
||||
case "clients:enroll":
|
||||
return "Manage client enrollment approvals";
|
||||
case "audit:view":
|
||||
return "View audit logs";
|
||||
default:
|
||||
@@ -103,6 +106,7 @@ export function getRolePermissions(role: UserRole): Permission[] {
|
||||
permissions.push("clients:control");
|
||||
if (hasPermission(role, "clients:view")) permissions.push("clients:view");
|
||||
if (hasPermission(role, "clients:build")) permissions.push("clients:build");
|
||||
if (hasPermission(role, "clients:enroll")) permissions.push("clients:enroll");
|
||||
if (hasPermission(role, "audit:view")) permissions.push("audit:view");
|
||||
|
||||
return permissions;
|
||||
|
||||
Reference in New Issue
Block a user