in termsOfService-server/src/main/java/jetbrains/buildServer/termsOfService/TermsOfServiceManagerImpl.java [249:263]
public synchronized List<Agreement> getMustAcceptAgreements(@NotNull SUser user) {
if (!TeamCityProperties.getBooleanOrTrue(TEAMCITY_TERMS_OF_SERVICE_ENABLED_PROPERTY)) {
return Collections.emptyList();
}
if (userModel.isGuestUser(user)) {
return Collections.emptyList();
}
if (userModel.isSuperUser(user) && !TeamCityProperties.getBooleanOrTrue(TEAMCITY_TERMS_OF_SERVICE_ASK_SUPER_USER_PROPERTY)) {
return Collections.emptyList();
}
return getAgreements(user).stream().filter(a -> !a.isAccepted(user)).collect(toList());
}