fix up minor inconsistency

This commit is contained in:
Shannon
2019-11-26 12:20:49 +11:00
parent ea8f1c3ae3
commit ba625e6181

View File

@@ -4,7 +4,7 @@
* @restrict E
**/
angular.module("umbraco.directives")
.directive('umbProperty', function (umbPropEditorHelper, userService) {
.directive('umbProperty', function (userService) {
return {
scope: {
property: "=",
@@ -15,21 +15,20 @@ angular.module("umbraco.directives")
restrict: 'E',
replace: true,
templateUrl: 'views/components/property/umb-property.html',
link: function ($scope) {
link: function (scope) {
$scope.propertyActions = [];
scope.propertyActions = [];
userService.getCurrentUser().then(function (u) {
var isAdmin = u.userGroups.indexOf('admin') !== -1;
$scope.propertyAlias = (Umbraco.Sys.ServerVariables.isDebuggingEnabled === true || isAdmin) ? $scope.property.alias : null;
scope.propertyAlias = (Umbraco.Sys.ServerVariables.isDebuggingEnabled === true || isAdmin) ? scope.property.alias : null;
});
},
//Define a controller for this directive to expose APIs to other directives
controller: function ($scope, $timeout) {
controller: function ($scope) {
var self = this;
self.propertyActions = [];
//set the API properties/methods
self.property = $scope.property;