Updating last remaining view perms to table perms.
This commit is contained in:
parent
41a9041268
commit
4c2e3a5489
2 changed files with 2 additions and 4 deletions
|
@ -34,7 +34,7 @@ router
|
||||||
"/api/views/:viewName",
|
"/api/views/:viewName",
|
||||||
paramResource("viewName"),
|
paramResource("viewName"),
|
||||||
authorized(
|
authorized(
|
||||||
permissions.PermissionType.VIEW,
|
permissions.PermissionType.TABLE,
|
||||||
permissions.PermissionLevel.READ
|
permissions.PermissionLevel.READ
|
||||||
),
|
),
|
||||||
rowController.fetchView
|
rowController.fetchView
|
||||||
|
|
|
@ -14,6 +14,7 @@ export function getPermissionType(resourceId: string) {
|
||||||
switch (docType) {
|
switch (docType) {
|
||||||
case DocumentType.TABLE:
|
case DocumentType.TABLE:
|
||||||
case DocumentType.ROW:
|
case DocumentType.ROW:
|
||||||
|
case DocumentType.VIEW:
|
||||||
return permissions.PermissionType.TABLE
|
return permissions.PermissionType.TABLE
|
||||||
case DocumentType.AUTOMATION:
|
case DocumentType.AUTOMATION:
|
||||||
return permissions.PermissionType.AUTOMATION
|
return permissions.PermissionType.AUTOMATION
|
||||||
|
@ -22,9 +23,6 @@ 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:
|
|
||||||
// views don't have an ID, will end up here
|
|
||||||
return permissions.PermissionType.VIEW
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue