public static void verifyManageAuthorization(AlertGroupEntity entity, Long clusterResourceId) throws AuthorizationException {
    if (entity != null) {
      verifyManageAuthorization(entity.getServiceName(), clusterResourceId);
    }
  }
Tests if the authenticated user is authorized to manage service- or cluster-level alert data.
An authorization failure results in a thrown {@link AuthorizationException}.

@param entity            an AlertGroupEntity
@param clusterResourceId the resource id of the relevant cluster
@throws AuthorizationException if the authenticated user is not authorized
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProviderUtils.java