Module: WithAuthorization
- Extended by:
- ActiveSupport::Concern
- Included in:
- Api::BaseController, DiscussionsMessagesController
- Defined in:
- app/controllers/concerns/with_authorization.rb
Instance Method Summary collapse
- #authorization_slug ⇒ Object
- #authorize_admin! ⇒ Object
- #authorize_janitor! ⇒ Object
- #authorize_moderator! ⇒ Object
- #authorize_owner! ⇒ Object
- #protection_slug ⇒ Object
Instance Method Details
#authorization_slug ⇒ Object
20 21 22 |
# File 'app/controllers/concerns/with_authorization.rb', line 20 def protection_slug || '_/_' end |
#authorize_admin! ⇒ Object
8 9 10 |
# File 'app/controllers/concerns/with_authorization.rb', line 8 def :admin end |
#authorize_janitor! ⇒ Object
4 5 6 |
# File 'app/controllers/concerns/with_authorization.rb', line 4 def :janitor end |
#authorize_moderator! ⇒ Object
16 17 18 |
# File 'app/controllers/concerns/with_authorization.rb', line 16 def :moderator end |
#authorize_owner! ⇒ Object
12 13 14 |
# File 'app/controllers/concerns/with_authorization.rb', line 12 def :owner end |
#protection_slug ⇒ Object
24 25 26 |
# File 'app/controllers/concerns/with_authorization.rb', line 24 def protection_slug @slug end |