Add back base default legacy views permissions
This commit is contained in:
parent
d6a7df886f
commit
a012c0a458
|
@ -87,6 +87,7 @@ export const BUILTIN_PERMISSIONS = {
|
||||||
new Permission(PermissionType.QUERY, PermissionLevel.WRITE),
|
new Permission(PermissionType.QUERY, PermissionLevel.WRITE),
|
||||||
new Permission(PermissionType.TABLE, PermissionLevel.WRITE),
|
new Permission(PermissionType.TABLE, PermissionLevel.WRITE),
|
||||||
new Permission(PermissionType.AUTOMATION, PermissionLevel.EXECUTE),
|
new Permission(PermissionType.AUTOMATION, PermissionLevel.EXECUTE),
|
||||||
|
new Permission(PermissionType.LEGACY_VIEW, PermissionLevel.READ),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
POWER: {
|
POWER: {
|
||||||
|
@ -97,6 +98,7 @@ export const BUILTIN_PERMISSIONS = {
|
||||||
new Permission(PermissionType.USER, PermissionLevel.READ),
|
new Permission(PermissionType.USER, PermissionLevel.READ),
|
||||||
new Permission(PermissionType.AUTOMATION, PermissionLevel.EXECUTE),
|
new Permission(PermissionType.AUTOMATION, PermissionLevel.EXECUTE),
|
||||||
new Permission(PermissionType.WEBHOOK, PermissionLevel.READ),
|
new Permission(PermissionType.WEBHOOK, PermissionLevel.READ),
|
||||||
|
new Permission(PermissionType.LEGACY_VIEW, PermissionLevel.READ),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
ADMIN: {
|
ADMIN: {
|
||||||
|
@ -108,6 +110,7 @@ export const BUILTIN_PERMISSIONS = {
|
||||||
new Permission(PermissionType.AUTOMATION, PermissionLevel.ADMIN),
|
new Permission(PermissionType.AUTOMATION, PermissionLevel.ADMIN),
|
||||||
new Permission(PermissionType.WEBHOOK, PermissionLevel.READ),
|
new Permission(PermissionType.WEBHOOK, PermissionLevel.READ),
|
||||||
new Permission(PermissionType.QUERY, PermissionLevel.ADMIN),
|
new Permission(PermissionType.QUERY, PermissionLevel.ADMIN),
|
||||||
|
new Permission(PermissionType.LEGACY_VIEW, PermissionLevel.READ),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,9 @@ export function getPermissionType(resourceId: string) {
|
||||||
case DocumentType.QUERY:
|
case DocumentType.QUERY:
|
||||||
case DocumentType.DATASOURCE:
|
case DocumentType.DATASOURCE:
|
||||||
return permissions.PermissionType.QUERY
|
return permissions.PermissionType.QUERY
|
||||||
|
default:
|
||||||
|
// legacy views don't have an ID, will end up here
|
||||||
|
return permissions.PermissionType.LEGACY_VIEW
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,5 @@ export enum PermissionType {
|
||||||
GLOBAL_BUILDER = "globalBuilder",
|
GLOBAL_BUILDER = "globalBuilder",
|
||||||
QUERY = "query",
|
QUERY = "query",
|
||||||
VIEW = "view",
|
VIEW = "view",
|
||||||
|
LEGACY_VIEW = "legacy_view",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue