Class: Anoubis::Tenant::IndexController

Inherits:
ApplicationController show all
Includes:
Anoubis::Tenant::Index::Actions, Anoubis::Tenant::Index::Callbacks
Defined in:
app/controllers/anoubis/tenant/index_controller.rb

Overview

Controller processes main system functions. Authenticates user, checks user access, outputs main menu and etc.

Instance Attribute Summary

Attributes inherited from Core::ApplicationController

#current_user, #etc, #exports, #locale, #output, #version, #writer

Instance Method Summary collapse

Methods included from Core::Index::Callbacks

#around_menu_output, #before_menu_output

Methods included from Anoubis::Tenant::Index::Actions

#login, #menu

Methods included from Core::Index::Actions

#logout

Methods inherited from ApplicationController

#get_user_model, #get_user_model_except, #menu_access

Methods inherited from Core::ApplicationController

#access_allowed?, #after_initialization, #anubis_core_initialization, #authentication, #bin_to_uuid, #default_locale, #error_exit, #get_user_model, #get_user_model_except, #menu_access, #new_session_id, #new_uuid, #options, #redis, #redis_prefix, #redis_save_user, #set_access_control_headers, #token, #uuid_to_bin

Instance Method Details

#authenticate?Boolean

Check if authentication required

Returns:

  • (Boolean)


17
18
19
20
21
22
23
24
# File 'app/controllers/anoubis/tenant/index_controller.rb', line 17

def authenticate?
  if controller_name == 'index'
    if action_name == 'login'
      return false
    end
  end
  return true
end

#check_menu_access?Boolean

Check if authentication required

Returns:

  • (Boolean)


28
29
30
31
32
33
34
35
# File 'app/controllers/anoubis/tenant/index_controller.rb', line 28

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