phase01
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import type { Permission } from './permissions';
|
||||
import { ALL_PERMISSIONS } from './permissions';
|
||||
|
||||
export const ROLES = {
|
||||
admin: {
|
||||
name: 'Admin',
|
||||
description: 'Full access to the organization',
|
||||
permissions: ALL_PERMISSIONS,
|
||||
},
|
||||
user: {
|
||||
name: 'User',
|
||||
description: 'Limited access, must be granted server-specific permissions',
|
||||
permissions: [
|
||||
'server.read',
|
||||
'console.read',
|
||||
'files.read',
|
||||
'backup.create',
|
||||
'backup.download',
|
||||
'schedule.read',
|
||||
'plugin.read',
|
||||
'config.read',
|
||||
'power.start',
|
||||
'power.stop',
|
||||
'power.restart',
|
||||
] as Permission[],
|
||||
},
|
||||
} as const;
|
||||
|
||||
export type Role = keyof typeof ROLES;
|
||||
Reference in New Issue
Block a user