public static boolean hasViewAuthorization(AlertGroupEntity entity, Long clusterResourceId) {
    return (null != entity) &&
        hasViewAuthorization(entity.getServiceName(), clusterResourceId);
  }
Tests if the authenticated user is authorized to view the requested alert data

@param entity            an AlertGroupEntity
@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