Просмотр исходного кода

Merge branch 'master' of github.com:grafana/grafana

Torkel Ödegaard 10 лет назад
Родитель
Сommit
afa4ee9a28
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      public/app/core/controllers/json_editor_ctrl.js

+ 1 - 1
public/app/core/controllers/json_editor_ctrl.js

@@ -8,7 +8,7 @@ function (angular, coreModule) {
   coreModule.default.controller('JsonEditorCtrl', function($scope) {
   coreModule.default.controller('JsonEditorCtrl', function($scope) {
 
 
     $scope.json = angular.toJson($scope.object, true);
     $scope.json = angular.toJson($scope.object, true);
-    $scope.canUpdate = $scope.updateHandler !== void 0;
+    $scope.canUpdate = $scope.updateHandler !== void 0 && $scope.contextSrv.isEditor;
 
 
     $scope.update = function () {
     $scope.update = function () {
       var newObject = angular.fromJson($scope.json);
       var newObject = angular.fromJson($scope.json);