public static boolean hasValidUserInContext(SecurityContext securityContext){
  if ((securityContext != null) && (securityContext.getUserPrincipal() instanceof StorageOSUser)) {
    return true;
  }
 else {
    return false;
  }
}

public static boolean hasValidUserInContext ( SecurityContext securityContext ) { if ( ( securityContext != null ) && ( securityContext . getUserPrincipal ( ) instanceof StorageOSUser ) ) { return true ; } else { return false ; } }
determine if the security context has a valid storageosuser object .
