private void addClusterResources(Set<Resource> resources, String username,
                                   String resourceType, Resource privilegeResource,
                                   Collection<RoleAuthorizationEntity> authorizationEntities,
                                   Set<String> requestedIds) {

    for (RoleAuthorizationEntity entity : authorizationEntities) {
      Resource resource = new ResourceImpl(Type.UserAuthorization);
      String clusterName = (String)privilegeResource.getPropertyValue(UserPrivilegeResourceProvider.CLUSTER_NAME);
      UserAuthorizationResponse userAuthorizationResponse = getResponse(entity.getAuthorizationId(),
        entity.getAuthorizationName(), clusterName, resourceType, username);
      setResourceProperty(resource, AUTHORIZATION_ID_PROPERTY_ID, userAuthorizationResponse.getAuthorizationId(), requestedIds);
      setResourceProperty(resource, USERNAME_PROPERTY_ID, username, requestedIds);
      setResourceProperty(resource, AUTHORIZATION_NAME_PROPERTY_ID, entity.getAuthorizationName(), requestedIds);
      setResourceProperty(resource, AUTHORIZATION_RESOURCE_TYPE_PROPERTY_ID, resourceType, requestedIds);
      setResourceProperty(resource, AUTHORIZATION_CLUSTER_NAME_PROPERTY_ID,
          privilegeResource.getPropertyValue(UserPrivilegeResourceProvider.CLUSTER_NAME),
          requestedIds);

      resources.add(resource);
    }
  }
Creates and adds resources to the results where each resource properly identities the cluster
to which the authorization data applies.
<p/>
Generates an AuthorizationInfo block containing the following fields:
<ul>
<li>authorization_id</li>
<li>authorization_name</li>
<li>cluster_name</li>
<li>resource_type</li>
<li>user_name</li>
</ul>

@param resources             the set of resources to amend
@param username              the username
@param resourceType          the resource type (typically "CLUSTER" or "AMBARI")
@param privilegeResource     the privilege resource used for retrieving cluster-specific details
@param authorizationEntities relevant AuthorizationEntity values for this authorization
@param requestedIds          the properties to include in the resulting resource instance
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProvider.java