Allow non-FGAC fallback to server admin role (#42175)
This commit is contained in:
@@ -74,7 +74,11 @@ export class ContextSrv {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hasRole(role: string) {
|
hasRole(role: string) {
|
||||||
return this.user.orgRole === role;
|
if (role === 'ServerAdmin') {
|
||||||
|
return this.isGrafanaAdmin;
|
||||||
|
} else {
|
||||||
|
return this.user.orgRole === role;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
accessControlEnabled(): boolean {
|
accessControlEnabled(): boolean {
|
||||||
|
|||||||
Reference in New Issue
Block a user