Skip to content
Snippets Groups Projects
Commit 20c46180 authored by Alinga Yeung's avatar Alinga Yeung
Browse files

Story ac2. Added code to check for null subject.

parent 9ce9301b
No related branches found
No related tags found
No related merge requests found
......@@ -140,6 +140,8 @@ public class GetUserAction extends AbstractUserAction
boolean isServops = false;
AccessControlContext acc = AccessController.getContext();
Subject subject = Subject.getSubject(acc);
if (subject != null)
{
for (Principal principal : subject.getPrincipals())
{
if (principal.getName().equals(this.getAugmentUserDN()))
......@@ -148,6 +150,7 @@ public class GetUserAction extends AbstractUserAction
break;
}
}
}
return isServops;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment