When a node is opened through a content picker don't allow editing doc type and template
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'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) {
|
function link(scope, element, attrs, umbVariantContentCtrl) {
|
||||||
|
|
||||||
@@ -17,10 +17,13 @@
|
|||||||
|
|
||||||
function onInit() {
|
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){
|
userService.getCurrentUser().then(function(user){
|
||||||
// only allow change of media type if user has access to the settings sections
|
// only allow change of media type if user has access to the settings sections
|
||||||
angular.forEach(user.sections, function(section){
|
angular.forEach(user.sections, function(section){
|
||||||
if(section.alias === "settings") {
|
if(section.alias === "settings" && !scope.isInfiniteMode) {
|
||||||
scope.allowChangeDocumentType = true;
|
scope.allowChangeDocumentType = true;
|
||||||
scope.allowChangeTemplate = true;
|
scope.allowChangeTemplate = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user