Добавление кнопки выхода, Изменение главной страницы на home, Выделение отдельного контроллера под организацию
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user