added possibility to use user in terms.ftl (#7831)

This commit is contained in:
supersoaker 2022-08-25 15:08:38 +02:00 committed by GitHub
parent e7a3e4b601
commit e47bbba7ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,9 @@ public class TermsAndConditions implements RequiredActionProvider, RequiredActio
@Override
public void requiredActionChallenge(RequiredActionContext context) {
Response challenge = context.form().createForm("terms.ftl");
Response challenge = context.form()
.setAttribute("user", context.getAuthenticationSession().getAuthenticatedUser())
.createForm("terms.ftl");
context.challenge(challenge);
}