(com.tll.server.AdminContext) rc.getSession().getAttribute(
com.tll.server.AdminContext.KEY);
if(sac == null) {
// presume not logged in yet
status.addMsg("Admin Context not found.", MsgLevel.INFO, MsgAttr.STATUS.flag);
return new AdminContextPayload(status, ac.isDebug(), ac.getEnvironment(), null, null);
}
final Marshaler entityMarshaller = mec.getMarshaler();
assert entityMarshaller != null : "No marshaler present";
final Model user = entityMarshaller.marshalEntity(sac.getUser(), new MarshalOptions(true, 1, null));
// NOTE: we want a distinct copy of the account here so we separately
// marshall the account as opposed to grabbing the nested account from the
// just marshaled user
final Model account = entityMarshaller.marshalEntity(sac.getUser().getAccount(), MarshalOptions.NON_RELATIONAL);
status.addMsg("Admin Context retrieved.", MsgLevel.INFO, MsgAttr.STATUS.flag);
return new AdminContextPayload(status, ac.isDebug(), ac.getEnvironment(), user, account);
}