private void authorizeGetResources(String clusterName) throws NoSuchParentResourceException, AuthorizationException {
    final boolean ambariLevelRequest = StringUtils.isBlank(clusterName);
    final ResourceType resourceType = ambariLevelRequest ? ResourceType.AMBARI : ResourceType.CLUSTER;
    Long resourceId;
    try {
      resourceId = ambariLevelRequest ? null : getClusterResourceId(clusterName);
    } catch (AmbariException e) {
      throw new NoSuchParentResourceException("Error while fetching cluster resource ID", e);
    }
    final Set<RoleAuthorization> requiredAuthorizations = ambariLevelRequest ? Sets.newHashSet(AMBARI_VIEW_STATUS_INFO)
        : Sets.newHashSet(CLUSTER_VIEW_STATUS_INFO, HOST_VIEW_STATUS_INFO, SERVICE_VIEW_STATUS_INFO);

    if (!AuthorizationHelper.isAuthorized(resourceType, resourceId, requiredAuthorizations)) {
      throw new AuthorizationException(String.format("The authenticated user is not authorized to fetch request related information."));
    }
  }
Create a  new resource provider for the given management controller.

@param managementController the management controller
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java