app/controllers/anoubis/sso/client/application_controller.rb
##
# Return access status for current user
Return access status for current user
Return access status for current user
def menu_access(controller, exit = true)
    menu_access_status = 'not'
    if self.current_user
      if self.current_user.menus
        if self.current_user.menus.key? controller.to_s.to_sym
          menu_access_status = self.current_user.menus[controller.to_s.to_sym]
        end
      end
    end
    if menu_access_status == 'not'
      self.error_exit({ error: I18n.t('errors.access_not_allowed') }) if exit
      return false
    end
    self.writer = true if menu_access_status == 'write'
    true
  end
def menu_access ( controller , exit = true ) menu_access_status = 'not' if self . current_user if self . current_user . menus if self . current_user . menus . key? controller . to_s . to_sym menu_access_status = self . current_user . menus [ controller . to_s . to_sym ] end end end if menu_access_status == 'not' self . error_exit ( { error : I18n . t ( 'errors.access_not_allowed' ) } ) if exit return false end self . writer = true if menu_access_status == 'write' true end
Return access status for current user
Return access status for current user
controller
<not_specific>
exit
<not_specific>