mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: Viewers can edit means that viewers have acces to Explore #14281
This commit is contained in:
@@ -16,6 +16,7 @@ import UsersListPage from 'app/features/users/UsersListPage';
|
||||
import DataSourceDashboards from 'app/features/datasources/DataSourceDashboards';
|
||||
import DataSourceSettingsPage from '../features/datasources/settings/DataSourceSettingsPage';
|
||||
import OrgDetailsPage from '../features/org/OrgDetailsPage';
|
||||
import config from 'app/core/config';
|
||||
|
||||
/** @ngInject */
|
||||
export function setupAngularRoutes($routeProvider, $locationProvider) {
|
||||
@@ -129,7 +130,7 @@ export function setupAngularRoutes($routeProvider, $locationProvider) {
|
||||
template: '<react-container />',
|
||||
reloadOnSearch: false,
|
||||
resolve: {
|
||||
roles: () => ['Editor', 'Admin'],
|
||||
roles: () => (config.viewersCanEdit ? [] : ['Editor', 'Admin']),
|
||||
component: () => import(/* webpackChunkName: "explore" */ 'app/features/explore/Wrapper'),
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user