Updating last remaining view perms to table perms.
This commit is contained in:
parent
41a9041268
commit
4c2e3a5489
|
@ -34,7 +34,7 @@ router
|
|||
"/api/views/:viewName",
|
||||
paramResource("viewName"),
|
||||
authorized(
|
||||
permissions.PermissionType.VIEW,
|
||||
permissions.PermissionType.TABLE,
|
||||
permissions.PermissionLevel.READ
|
||||
),
|
||||
rowController.fetchView
|
||||
|
|
|
@ -14,6 +14,7 @@ export function getPermissionType(resourceId: string) {
|
|||
switch (docType) {
|
||||
case DocumentType.TABLE:
|
||||
case DocumentType.ROW:
|
||||
case DocumentType.VIEW:
|
||||
return permissions.PermissionType.TABLE
|
||||
case DocumentType.AUTOMATION:
|
||||
return permissions.PermissionType.AUTOMATION
|
||||
|
@ -22,9 +23,6 @@ export function getPermissionType(resourceId: string) {
|
|||
case DocumentType.QUERY:
|
||||
case DocumentType.DATASOURCE:
|
||||
return permissions.PermissionType.QUERY
|
||||
default:
|
||||
// views don't have an ID, will end up here
|
||||
return permissions.PermissionType.VIEW
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue