}
public boolean isAuthorized(String userId, List<String> groupIds, Permission permission, Resource resource, String resourceId) {
AuthorizationCheck authCheck = new AuthorizationCheck();
authCheck.setAuthUserId(userId);
authCheck.setAuthGroupIds(groupIds);
authCheck.setAuthResourceType(resource.resourceType());
authCheck.setAuthResourceId(resourceId);
authCheck.setAuthPerms(permission.getValue());
return getDbEntityManager().selectBoolean("isUserAuthorizedForResource", authCheck);
}