Validate.notNull(user);
Validate.notNull(values);
final UserRightDO rightDO = user.getRight(rightId);
final UserRight right = userRights.getRight(rightId);
for (final UserRightValue value : values) {
if ((rightDO == null || rightDO.getValue() == null) && right.matches(userGroupCache, user, value) == true) {
return true;
}
if (rightDO != null && rightDO.getValue() == value) {
if (right != null && right.isAvailable(userGroupCache, user, value) == true) {
return true;