mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: remove hasAccess and hasAcessInMetadata (#76237)
* remove hasAccess and hasAcessInMetadata in favour of hasPermission and hasPermissionInMetadata * test fixes * more test fixes
This commit is contained in:
@@ -167,14 +167,6 @@ export class ContextSrv {
|
||||
return this.hasPermission(AccessControlAction.DataSourcesExplore) && config.exploreEnabled;
|
||||
}
|
||||
|
||||
hasAccess(action: string, fallBack: boolean): boolean {
|
||||
return this.hasPermission(action);
|
||||
}
|
||||
|
||||
hasAccessInMetadata(action: string, object: WithAccessControlMetadata, fallBack: boolean): boolean {
|
||||
return this.hasPermissionInMetadata(action, object);
|
||||
}
|
||||
|
||||
// evaluates access control permissions, granting access if the user has any of them
|
||||
evaluatePermission(actions: string[]) {
|
||||
if (actions.some((action) => this.hasPermission(action))) {
|
||||
|
||||
Reference in New Issue
Block a user