Browse Source

Merge pull request #4009 from utkarshcmu/viewer-bug

Viewers restricted to edit panel
Torkel Ödegaard 10 years ago
parent
commit
14952de2ee
1 changed files with 1 additions and 1 deletions
  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) {
 
     $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 () {
       var newObject = angular.fromJson($scope.json);