mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 22:36:01 +00:00
SYNC: Merge pull request #12 from dbgate/feature/team-files
This commit is contained in:
@@ -107,11 +107,27 @@ export function testSubPermission(
|
||||
export function getPredefinedPermissions(predefinedRoleName: string) {
|
||||
switch (predefinedRoleName) {
|
||||
case 'superadmin':
|
||||
return ['*', '~widgets/*', 'widgets/admin', 'widgets/database', '~all-connections'];
|
||||
return ['*', '~widgets/*', 'widgets/admin', 'widgets/database', '~all-connections', '~all-team-files/*'];
|
||||
case 'logged-user':
|
||||
return ['*', '~widgets/admin', '~admin/*', '~internal-storage', '~all-connections', '~run-shell-script'];
|
||||
return [
|
||||
'*',
|
||||
'~widgets/admin',
|
||||
'~admin/*',
|
||||
'~internal-storage',
|
||||
'~all-connections',
|
||||
'~run-shell-script',
|
||||
'~all-team-files/*',
|
||||
];
|
||||
case 'anonymous-user':
|
||||
return ['*', '~widgets/admin', '~admin/*', '~internal-storage', '~all-connections', '~run-shell-script'];
|
||||
return [
|
||||
'*',
|
||||
'~widgets/admin',
|
||||
'~admin/*',
|
||||
'~internal-storage',
|
||||
'~all-connections',
|
||||
'~run-shell-script',
|
||||
'~all-team-files/*',
|
||||
];
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user