Merge branch 'master' into add_roles_via_LTI
# Conflicts: # app/views/application/_breadcrumbs.html.slim # app/views/application/welcome.html.slim # app/views/exercise_collections/show.html.slim # app/views/external_users/index.html.slim # app/views/layouts/application.html.slim # app/views/proxy_exercises/index.html.slim # app/views/user_exercise_feedbacks/index.html.slim # app/views/user_mailer/send_thank_you_note.slim
This commit is contained in:
@ -5,7 +5,7 @@ class ApplicationController < ActionController::Base
|
||||
MEMBER_ACTIONS = [:destroy, :edit, :show, :update]
|
||||
|
||||
after_action :verify_authorized, except: [:help, :welcome]
|
||||
before_action :set_locale, :allow_iframe_requests
|
||||
before_action :set_locale, :allow_iframe_requests, :load_embed_options
|
||||
protect_from_forgery(with: :exception, prepend: true)
|
||||
rescue_from Pundit::NotAuthorizedError, with: :render_not_authorized
|
||||
|
||||
@ -39,4 +39,14 @@ class ApplicationController < ActionController::Base
|
||||
def allow_iframe_requests
|
||||
response.headers.delete('X-Frame-Options')
|
||||
end
|
||||
|
||||
def load_embed_options
|
||||
if session[:embed_options].present? && session[:embed_options].is_a?(Hash)
|
||||
@embed_options = session[:embed_options].symbolize_keys
|
||||
else
|
||||
@embed_options = {}
|
||||
end
|
||||
@embed_options
|
||||
end
|
||||
private :load_embed_options
|
||||
end
|
||||
|
Reference in New Issue
Block a user