diff --git a/src/permission-ui/permission-ui.js b/src/permission-ui/permission-ui.js index f791bfa..d08f67e 100644 --- a/src/permission-ui/permission-ui.js +++ b/src/permission-ui/permission-ui.js @@ -10,7 +10,7 @@ function config($stateProvider) { 'ngInject'; - $stateProvider.decorator('$state', function (state) { + function $state($delegate) { /** * Property containing full state object definition * @@ -19,12 +19,14 @@ function config($stateProvider) { * * @returns {Object} */ - state.self.$$permissionState = function () { - return state; + $delegate.self.$$permissionState = function () { + return $delegate; }; - return state; - }); + return $delegate; + } + + $stateProvider.decorator('$state', $state); } /** diff --git a/src/permission/authorization/Authorization.js b/src/permission/authorization/Authorization.js index f307574..5647b00 100644 --- a/src/permission/authorization/Authorization.js +++ b/src/permission/authorization/Authorization.js @@ -35,7 +35,6 @@ function PermAuthorization($q) { * @param deferred {Object} Promise defer * @param map {permission.PermissionMap} Access rights map * - * @returns {Promise} $q.promise object */ function resolveExceptPrivilegeMap(deferred, map) { var exceptPromises = map.resolvePropertyValidity(map.except);