Sha256: f2bce68325165ea1addd1110123a1b547c4a9ddee0a8d6c1508c53f3bf14c8b8

Contents?: true

Size: 1.05 KB

Versions: 5

Compression:

Stored size: 1.05 KB

Contents

require_dependency "anoubis/tenant/application_controller"
require_dependency "anoubis/tenant/index/actions"
require_dependency "anoubis/tenant/index/callbacks"

module Anoubis
  ##
  # Module presents all tenant functions for Anubis Library
  module Tenant
    ##
    # Controller processes main system functions. Authenticates user, checks user access, outputs main menu and etc.
    class IndexController < Anoubis::Tenant::ApplicationController
      include Anoubis::Tenant::Index::Actions
      include Anoubis::Tenant::Index::Callbacks

      ##
      # Check if authentication required
      def authenticate?
        if controller_name == 'index'
          if action_name == 'login'
            return false
          end
        end
        return true
      end

      ##
      # Check if authentication required
      def check_menu_access?
        if controller_name == 'index'
          if action_name == 'login' || action_name == 'menu' || action_name == 'logout'
            return false
          end
        end
        return true
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
anoubis-1.0.12 app/controllers/anoubis/tenant/index_controller.rb
anoubis-1.0.11 app/controllers/anoubis/tenant/index_controller.rb
anoubis-1.0.10 app/controllers/anoubis/tenant/index_controller.rb
anoubis-1.0.8 app/controllers/anoubis/tenant/index_controller.rb
anoubis-1.0.7 app/controllers/anoubis/tenant/index_controller.rb