+ /** Get the primary context this user belongs to. */
+ public static boolean isUserContext(String context) {
+ // TODO have the role context as a separated credential in the Subjecto?
+ return RoleNameUtils.getContext(getUsername()).equalsIgnoreCase(context);
+ }
+