When I’m listening to Rescoped Event I check if the user is not anonymous.
@EventListener
public void onPullRequestRescoped(PullRequestRescopedEvent event) {
ApplicationUser user = this.authenticationContext.getCurrentUser();
boolean isAuth = this.authenticationContext.isAuthenticated();
if (user == null) {
return;
}
...do something here when the user is not anonymous...
}
in that code user always is null even if another listeners return user = InternalNormalUser{id=2, username=julia}
What’ the problem with PullRequestRescopedEvent? Does anyone know?
Thank you very much in advance
Julia