only allow change of doc type if you have access to the settings section
This commit is contained in:
@@ -11,9 +11,19 @@
|
||||
scope.publishStatus = {};
|
||||
|
||||
scope.disableTemplates = Umbraco.Sys.ServerVariables.features.disabledFeatures.disableTemplates;
|
||||
scope.allowChangeDocumentType = false;
|
||||
|
||||
function onInit() {
|
||||
|
||||
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") {
|
||||
scope.allowChangeDocumentType = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var keys = [
|
||||
"general_deleted",
|
||||
"content_unpublished",
|
||||
@@ -32,8 +42,6 @@
|
||||
|
||||
});
|
||||
|
||||
scope.allowOpen = true;
|
||||
|
||||
scope.datePickerConfig = {
|
||||
pickDate: true,
|
||||
pickTime: true,
|
||||
|
||||
@@ -179,9 +179,9 @@
|
||||
|
||||
<umb-control-group data-element="node-info-document-type" label="@content_documentType">
|
||||
<umb-node-preview style="max-width: 100%; margin-bottom: 0;"
|
||||
icon="documentType.icon"
|
||||
name="documentType.name"
|
||||
allow-open="allowOpen"
|
||||
icon="node.icon"
|
||||
name="node.contentTypeName"
|
||||
allow-open="allowChangeDocumentType"
|
||||
on-open="openDocumentType(documentType)">
|
||||
</umb-node-preview>
|
||||
</umb-control-group>
|
||||
|
||||
Reference in New Issue
Block a user