code: function resolveStatePermissionMap(privilegesNames, map) {
      if (!privilegesNames.length) {
        return [$q.reject()];
      }
  
      return privilegesNames.map(function (statePrivileges) {
        var resolvedStatePrivileges = map.resolvePropertyValidity(statePrivileges);
        return $q.any(resolvedStatePrivileges)
          .then(function (resolvedPermissions) {
            if (angular.isArray(resolvedPermissions)) {
              return resolvedPermissions[0];
            }
            return resolvedPermissions;
          });
      });
    }
docs: Performs iteration over list of privileges looking for matches
  @methodOf permission.ui.PermStateAuthorization
  @private
  
  @param privilegesNames {Array} Array of sets of access rights
  @param map {permission.ui.StatePermissionMap} State access rights map
  
  @returns {Array<Promise>} Promise collection