Class: API::APIGuard::AdminModeMiddleware
- Inherits:
-
Grape::Middleware::Base
- Object
- Grape::Middleware::Base
- API::APIGuard::AdminModeMiddleware
- Defined in:
- lib/api/api_guard.rb
Instance Method Summary collapse
Instance Method Details
#after ⇒ Object
190 191 192 193 194 195 196 197 |
# File 'lib/api/api_guard.rb', line 190 def after # Use a Grape middleware since the Grape `after` blocks might run # before we are finished rendering the `Grape::Entity` classes Gitlab::Auth::CurrentUserMode.reset_bypass_session! if Feature.enabled?(:user_mode_in_session) # Explicit nil is needed or the api call return value will be overwritten nil end |