Добавление кнопки выхода, Изменение главной страницы на home, Выделение отдельного контроллера под организацию

This commit is contained in:
ARLakhin
2026-03-26 00:45:44 +03:00
parent df4c307e24
commit 853b82660f
14 changed files with 169 additions and 27 deletions
+7 -1
View File
@@ -2,11 +2,13 @@ module Authorization
extend ActiveSupport::Concern
included do
before_action :set_paper_trail_whodunnit
before_action :load_current_user # load user from database
before_action :set_paper_trail_whodunnit
before_action :check_authentication # check if user authenticated
before_action :check_current_user # check if user authorized
helper_method :logged_in?, :current_user
rescue_from ActionController::UnknownFormat do
request.format = :html
render_error
@@ -15,6 +17,10 @@ module Authorization
def current_login
session['zombie'] || cas_login
end
def logged_in?
current_login.present?
end
private