Merge pull request #253 from patriot1burke/master

fix NPE
This commit is contained in:
Bill Burke 2014-02-28 09:20:09 -05:00
commit e02d3748a9

View file

@ -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();