Sha256: add91ec444cb96c60d21827a3c36d93e90d3c8cb43ebfb6ba782644099432f31

Contents?: true

Size: 999 Bytes

Versions: 5

Compression:

Stored size: 999 Bytes

Contents

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

module Anoubis
  module Core
    ##
    # Controller processes main system functions. Authenticates user, checks user access, outputs main menu and etc.
    class IndexController < Anoubis::Core::ApplicationController
      include Anoubis::Core::Index::Actions
      include Anoubis::Core::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/core/index_controller.rb
anoubis-1.0.11 app/controllers/anoubis/core/index_controller.rb
anoubis-1.0.10 app/controllers/anoubis/core/index_controller.rb
anoubis-1.0.8 app/controllers/anoubis/core/index_controller.rb
anoubis-1.0.7 app/controllers/anoubis/core/index_controller.rb