File tree Expand file tree Collapse file tree
evaluationserver/app/controllers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11class AdministrationController < ApplicationController
22
33 def admin_mode_on
4+ request . session_options [ :skip ] = false
45 session [ :admin ] = true
56 redirect_back ( fallback_location : root_path )
67 end
78
89 def admin_mode_off
10+ request . session_options [ :skip ] = false
911 session . delete ( :admin )
1012 redirect_back ( fallback_location : root_path )
1113 end
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ class ApplicationController < ActionController::Base
22 # Prevent CSRF attacks by raising an exception.
33 # For APIs, you may want to use :null_session instead.
44 protect_from_forgery with : :exception
5-
5+
66 before_action :set_cache_headers
77
88 CREDENTIALS = {
@@ -47,6 +47,7 @@ def set_cache_headers
4747 response . headers [ "Cache-Control" ] = "no-cache, no-store"
4848 response . headers [ "Pragma" ] = "no-cache"
4949 response . headers [ "Expires" ] = "Fri, 01 Jan 1990 00:00:00 GMT"
50+ request . session_options [ :skip ] = true
5051 end
5152
5253end
You can’t perform that action at this time.
0 commit comments