Panel Menu: Use config explore enabled as an override to access control (#57225)

* Use config explore as an override to access control

* Change logic to need something explicitly false

* Keep logic consistent
This commit is contained in:
Kristina
2022-10-19 15:21:40 -05:00
committed by GitHub
parent bdb97496ec
commit d81a3e524d
+1 -1
View File
@@ -157,7 +157,7 @@ export class ContextSrv {
hasAccessToExplore() {
if (this.accessControlEnabled()) {
return this.hasPermission(AccessControlAction.DataSourcesExplore);
return this.hasPermission(AccessControlAction.DataSourcesExplore) && config.exploreEnabled;
}
return (this.isEditor || config.viewersCanEdit) && config.exploreEnabled;
}