} else {
String userGroupsOnly = settingMan.getValue("system/metadataprivs/usergrouponly");
if (userGroupsOnly.equals("true")) {
// If user is member of the group, user can set operation
if (userGroupRepo.exists(new UserGroupId().setGroupId(grpId).setUserId(userId))) {
throw new ServiceNotAllowedEx("User can't set operation for group " + grpId + " because the user in not"
+ " member of this group.");
}
}
}