|
|
@@ -11,6 +11,7 @@ export class User {
|
|
|
timezone: string;
|
|
|
helpFlags1: number;
|
|
|
lightTheme: boolean;
|
|
|
+ hasEditPermissionInFolders: boolean;
|
|
|
|
|
|
constructor() {
|
|
|
if (config.bootData.user) {
|
|
|
@@ -28,6 +29,7 @@ export class ContextSrv {
|
|
|
isEditor: any;
|
|
|
sidemenu: any;
|
|
|
sidemenuSmallBreakpoint = false;
|
|
|
+ hasEditPermissionInFolders: boolean;
|
|
|
|
|
|
constructor() {
|
|
|
this.sidemenu = store.getBool('grafana.sidemenu', true);
|
|
|
@@ -44,6 +46,7 @@ export class ContextSrv {
|
|
|
this.isSignedIn = this.user.isSignedIn;
|
|
|
this.isGrafanaAdmin = this.user.isGrafanaAdmin;
|
|
|
this.isEditor = this.hasRole('Editor') || this.hasRole('Admin');
|
|
|
+ this.hasEditPermissionInFolders = this.user.hasEditPermissionInFolders;
|
|
|
}
|
|
|
|
|
|
hasRole(role) {
|