Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,13 @@ public UserAgreementFilter(ConfigurationService configurationService) {
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {

Context context = ContextUtil.obtainContext(request);

boolean filterEnabled = configurationService.getBooleanProperty("user-agreement.enabled", false);
if (!filterEnabled) {
filterChain.doFilter(request, response);
return;
}

Context context = ContextUtil.obtainContext(request);
EPerson currentUser = context.getCurrentUser();
if (isNotOpenPath(request) && currentUser != null) {
boolean isUserAgreementAccepted = BooleanUtils
Expand All @@ -81,4 +80,4 @@ private boolean isNotOpenPath(HttpServletRequest request) {
.noneMatch(openPath -> openPath.matches(request));
}

}
}