restoreBaseSession method

void restoreBaseSession(
  1. AuthUserSession session
)

Restores a previously captured base session. Used to recover admin state after a failed switchSession so that isBaseUserAdmin does not permanently return false.

Implementation

void restoreBaseSession(AuthUserSession session) {
  if (_baseSession == null) {
    _baseSession = session;
    logger.info(
      this,
      'Restored base session for user: ${session.userInfo.userId}',
    );
  }
}