Class: TestAccessController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- BarkestCore::ApplicationControllerBase
- ApplicationController
- TestAccessController
- Defined in:
- app/controllers/test_access_controller.rb
Overview
A controller used specifically to test authentication and authorization.
Instance Method Summary collapse
-
#allow_anon ⇒ Object
Tests an action that doesn’t require a user to be logged in.
-
#require_admin ⇒ Object
Tests an action that requires a user that is an administrator to be logged in.
-
#require_group_x ⇒ Object
Tests an action that requires a user that is a member of one of the groups to be logged in.
-
#require_user ⇒ Object
Tests an action that requires a user to be logged in.
Methods inherited from BarkestCore::ApplicationControllerBase
#authorize!, #show_denial_reason?
Methods included from BarkestCore::StatusHelper
#clear_system_status, #show_system_status, #status_button_label, #status_redirect_url
Methods included from BarkestCore::RecaptchaHelper
#add_recaptcha_challenge, #verify_recaptcha_challenge
Methods included from BarkestCore::SessionsHelper
#current_user, #current_user?, #forget, #log_in, #log_out, #logged_in?, #redirect_back_or, #remember, #store_location, #store_location_and_redirect_to, #system_admin?
Instance Method Details
#allow_anon ⇒ Object
Tests an action that doesn’t require a user to be logged in.
9 10 |
# File 'app/controllers/test_access_controller.rb', line 9 def allow_anon end |
#require_admin ⇒ Object
Tests an action that requires a user that is an administrator to be logged in.
19 20 |
# File 'app/controllers/test_access_controller.rb', line 19 def require_admin end |
#require_group_x ⇒ Object
Tests an action that requires a user that is a member of one of the groups to be logged in.
The valid groups are ‘group 1’, ‘group 2’, and ‘group 3’.
26 27 |
# File 'app/controllers/test_access_controller.rb', line 26 def require_group_x end |
#require_user ⇒ Object
Tests an action that requires a user to be logged in.
14 15 |
# File 'app/controllers/test_access_controller.rb', line 14 def require_user end |