private void addViewResources(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 viewName = (String)privilegeResource.getPropertyValue(UserPrivilegeResourceProvider.VIEW_NAME);
      String viewVersion = (String)privilegeResource.getPropertyValue(UserPrivilegeResourceProvider.VIEW_VERSION);
      String viewInstanceName = (String)privilegeResource.getPropertyValue(UserPrivilegeResourceProvider.INSTANCE_NAME);
      UserAuthorizationResponse userAuthorizationResponse = getResponse(entity.getAuthorizationId(),
        entity.getAuthorizationName(), resourceType, username, viewName, viewVersion, viewInstanceName);
      setResourceProperty(resource, AUTHORIZATION_ID_PROPERTY_ID, userAuthorizationResponse.getAuthorizationId(), requestedIds);
      setResourceProperty(resource, USERNAME_PROPERTY_ID, userAuthorizationResponse.getUserName(), requestedIds);
      setResourceProperty(resource, AUTHORIZATION_NAME_PROPERTY_ID, userAuthorizationResponse.getAuthorizationName(), requestedIds);
      setResourceProperty(resource, AUTHORIZATION_RESOURCE_TYPE_PROPERTY_ID, userAuthorizationResponse.getResourceType(), requestedIds);
      setResourceProperty(resource, AUTHORIZATION_VIEW_NAME_PROPERTY_ID, userAuthorizationResponse.getViewName(),
          requestedIds);
      setResourceProperty(resource, AUTHORIZATION_VIEW_VERSION_PROPERTY_ID, userAuthorizationResponse.getViewVersion(),
          requestedIds);
      setResourceProperty(resource, AUTHORIZATION_VIEW_INSTANCE_NAME_PROPERTY_ID, userAuthorizationResponse.getViewInstanceName(),
          requestedIds);

      resources.add(resource);
    }
  }
Creates and adds resources to the results where each resource properly identities the view
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>resource_type</li>
<li>view_name</li>
<li>view_version</li>
<li>view_instance_name</li>
<li>user_name</li>
</ul>

@param resources             the set of resources to amend
@param username              the username
@param resourceType          the resource type (typically "VIEW")
@param privilegeResource     the privilege resource used for retrieving view-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