spec/dummy/app/controllers/application_controller.rb in aaf-gumboot-2.1.3 vs spec/dummy/app/controllers/application_controller.rb in aaf-gumboot-2.1.4
- old
+ new
@@ -14,10 +14,11 @@
after_action :ensure_access_checked
def subject
subject = session[:subject_id] && Subject.find_by(id: session[:subject_id])
return nil unless subject.try(:functioning?)
+
@subject = subject
end
protected
@@ -36,9 +37,10 @@
raise("No access control performed by #{method}")
end
def check_access!(action)
raise(Forbidden) unless subject.permits?(action)
+
@access_checked = true
end
def public_action
@access_checked = true