Method: Anoubis::Sso::Client::ApplicationController#menu_access
- Defined in:
- app/controllers/anoubis/sso/client/application_controller.rb
#menu_access(controller, exit = true) ⇒ Object
Return access status for current user
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'app/controllers/anoubis/sso/client/application_controller.rb', line 120 def (controller, exit = true) = 'not' if self.current_user if self.current_user. if self.current_user..key? controller.to_s.to_sym = self.current_user.[controller.to_s.to_sym] end end end if == 'not' self.error_exit({ error: I18n.t('errors.access_not_allowed') }) if exit return false end self.writer = true if == 'write' true end |