use of org.haiku.haikudepotserver.dataobjects.auto._UserUsageConditionsAgreement in project haikudepotserver by haiku.
the class UserServiceImpl method isUserCurrentlyAgreeingToCurrentUserUsageConditions.
@Override
public boolean isUserCurrentlyAgreeingToCurrentUserUsageConditions(User user) {
ObjectContext context = user.getObjectContext();
String code = UserUsageConditions.getLatest(context).getCode();
return user.tryGetUserUsageConditionsAgreement().filter(_UserUsageConditionsAgreement::getActive).filter(uuca -> uuca.getUserUsageConditions().getCode().equals(code)).isPresent();
}
Aggregations