code: function handleUnauthorizedState(rejectedPermission, permissionMap) {
          PermTransitionEvents.broadcastPermissionDeniedEvent();
  
          permissionMap
            .resolveRedirectState(rejectedPermission)
            .then(function (redirect) {
              $location.path(redirect.state).replace();
            });
        }
docs: Handles redirection for unauthorized access
  @method
  @private
  
  @param rejectedPermission {String} Rejected access right
  @param permissionMap {permission.PermPermissionMap} State permission map