mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Access control: expose permissions to the frontend (#32954)
* Expose user permissions to the frontend * Do not include empty scope * Extend ContextSrv with hasPermission() method * Add access control types * Fix type error (make permissions optional) * Fallback if access control disabled * Move UserPermission to types * Simplify hasPermission()
This commit is contained in:
@@ -46,6 +46,7 @@ export interface FeatureToggles {
|
||||
live: boolean;
|
||||
ngalert: boolean;
|
||||
panelLibrary: boolean;
|
||||
accesscontrol: boolean;
|
||||
|
||||
/**
|
||||
* @remarks
|
||||
|
||||
@@ -57,6 +57,7 @@ export class GrafanaBootConfig implements GrafanaConfig {
|
||||
ngalert: false,
|
||||
panelLibrary: false,
|
||||
reportVariables: false,
|
||||
accesscontrol: false,
|
||||
};
|
||||
licenseInfo: LicenseInfo = {} as LicenseInfo;
|
||||
rendererAvailable = false;
|
||||
|
||||
Reference in New Issue
Block a user