public static boolean hasViewAuthorization(String serviceName, Long clusterResourceId) {
    return hasAuthorization(serviceName, clusterResourceId,
        AUTHORIZATIONS_VIEW_CLUSTER_ALERTS, AUTHORIZATIONS_VIEW_SERVICE_ALERTS);
  }
Tests if the authenticated user is authorized to view service- or cluster-level alert data

@param serviceName       the name of the relevant service - null or empty indicates a cluster-level alert
@param clusterResourceId the resource id of the relevant cluster
@return true if the authenticated user is authorized; otherwise false
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProviderUtils.java