boolean isUserAuthorized = user.isSuperAdmin();
if (!isUserAuthorized) {
    isUserAuthorized = isUserAdminOfEntity1();
}
if (!isUserAuthorized) {
    isUserAuthorized = isUserAdminOfEntity2();
}
if (!isUserAuthorized) {
    throw new AccessDeniedException("Authenticated user is not admin ");
}
By tralaladidou, 2019-05-07 16:37:32