Skip to content
Commit 696a7f96 authored by Stephen Connolly's avatar Stephen Connolly
Browse files

Add API to allow complete roundtrip from Authentication to User

Without this change you need to do:

```
User user;
final SecurityContext oldContext = ACL.impersonate(a);
try {
    user = User.current();
} finally {
    SecurityContextHolder.setContext(oldContext);
}
```

Which seems incredibly wasteful.

Or else you need to replicate the logic in User.current() which makes that code hard to change.
parent fec55781
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment