fix NPE
This commit is contained in:
parent
3e68cc601a
commit
4dc4c56921
1 changed files with 4 additions and 0 deletions
|
@ -154,6 +154,10 @@ public class AdminService {
|
|||
if (realm == null)
|
||||
throw new NotFoundException();
|
||||
Auth auth = authManager.authenticateCookie(realm, headers);
|
||||
if (auth == null) {
|
||||
logger.debug("No auth cookie");
|
||||
return Response.status(401).build();
|
||||
}
|
||||
UserModel user = auth.getUser();
|
||||
if (user == null) {
|
||||
return Response.status(401).build();
|
||||
|
|
Loading…
Reference in a new issue