From c0f5158b030c797878c655d2a87a30a364c81444 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Tue, 27 Nov 2018 09:58:57 +0100 Subject: [PATCH] When a node is opened through a content picker don't allow editing doc type and template --- .../components/content/umbcontentnodeinfo.directive.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js index 78efc8f789..d2a429f813 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbcontentnodeinfo.directive.js @@ -1,7 +1,7 @@ (function () { 'use strict'; - function ContentNodeInfoDirective($timeout, $routeParams, logResource, eventsService, userService, localizationService, dateHelper, editorService, redirectUrlsResource) { + function ContentNodeInfoDirective($timeout, logResource, eventsService, userService, localizationService, dateHelper, editorService, redirectUrlsResource) { function link(scope, element, attrs, umbVariantContentCtrl) { @@ -17,10 +17,13 @@ function onInit() { + // if there are any infinite editors open we are in infinite editing + scope.isInfiniteMode = editorService.getNumberOfEditors() > 0 ? true : false; + userService.getCurrentUser().then(function(user){ // only allow change of media type if user has access to the settings sections angular.forEach(user.sections, function(section){ - if(section.alias === "settings") { + if(section.alias === "settings" && !scope.isInfiniteMode) { scope.allowChangeDocumentType = true; scope.allowChangeTemplate = true; }