diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/media/umbmedianodeinfo.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/media/umbmedianodeinfo.directive.js index 1aa026cb3a..c946a9a133 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/media/umbmedianodeinfo.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/media/umbmedianodeinfo.directive.js @@ -8,11 +8,22 @@ var evts = []; function onInit() { - scope.allowOpenMediaType = true; + // By default don't show the open anchors + scope.allowOpenMediaType = false; + + // If logged in as an admin user show the open anchors + userService.getCurrentUser().then(function (currentUser) { + if(currentUser.userType === "admin"){ + scope.allowOpenMediaType = true; + } + }); + // get document type details scope.mediaType = scope.node.contentType; + // get node url scope.nodeUrl = scope.node.mediaLink; + // make sure dates are formatted to the user's locale formatDatesToLocal(); } @@ -30,7 +41,7 @@ var url = "/settings/mediaTypes/edit/" + mediaType.id; $location.path(url); }; - + // watch for content updates - reload content when node is saved, published etc. scope.$watch('node.updateDate', function(newValue, oldValue){ if(!newValue) { return; } @@ -64,4 +75,4 @@ angular.module('umbraco.directives').directive('umbMediaNodeInfo', MediaNodeInfoDirective); -})(); \ No newline at end of file +})();