RBAC: Add RBAC for query caching (#52113)
* start adding RBAC for query caching * update with scope Co-authored-by: Leonard Gram <leo@xlson.com>
This commit is contained in:
co-authored by
Leonard Gram
parent
8ee0555bac
commit
44cc9132e3
@@ -121,7 +121,9 @@ export function buildNavModel(dataSource: DataSourceSettings, plugin: GenericDat
|
||||
}
|
||||
|
||||
if (featureEnabled('caching')) {
|
||||
navModel.children!.push(caching);
|
||||
if (contextSrv.hasPermissionInMetadata(AccessControlAction.DataSourcesCachingRead, dataSource)) {
|
||||
navModel.children!.push(caching);
|
||||
}
|
||||
} else if (highlightsEnabled && !isLoadingNav) {
|
||||
navModel.children!.push({
|
||||
...caching,
|
||||
|
||||
@@ -50,6 +50,7 @@ export enum AccessControlAction {
|
||||
DataSourcesWrite = 'datasources:write',
|
||||
DataSourcesDelete = 'datasources:delete',
|
||||
DataSourcesPermissionsRead = 'datasources.permissions:read',
|
||||
DataSourcesCachingRead = 'datasources.caching:read',
|
||||
DataSourcesInsightsRead = 'datasources.insights:read',
|
||||
|
||||
ActionServerStatsRead = 'server.stats:read',
|
||||
|
||||
Reference in New Issue
Block a user