Viewers restricted to edit panel

This commit is contained in:
utkarshcmu
2016-02-12 07:34:56 -08:00
parent b5dc1727d2
commit 23167a0bb3

View File

@@ -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);