mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 11:44:02 +00:00
Merge pull request #3619 from hennevogel/refactor/sign-path
Move sign_in_path into the controller it's used...
This commit is contained in:
commit
3c23b5c8ed
2 changed files with 9 additions and 9 deletions
|
|
@ -16,7 +16,7 @@ module Admin
|
|||
end
|
||||
|
||||
def verify_user_admin
|
||||
if (current_user.nil?)
|
||||
if current_user.nil?
|
||||
redirect_to sign_in_path
|
||||
return false
|
||||
end
|
||||
|
|
@ -26,5 +26,13 @@ module Admin
|
|||
raise CanCan::AccessDenied.new('You are not authorized to access this page.')
|
||||
end
|
||||
end
|
||||
|
||||
def sign_in_path
|
||||
if ENV.fetch('OSEM_ICHAIN_ENABLED', nil) == 'true'
|
||||
User.ichain_login_url
|
||||
else
|
||||
new_user_session_path
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -115,14 +115,6 @@ module ApplicationHelper
|
|||
conference.event_types.map { |et| et.title.pluralize }.to_sentence
|
||||
end
|
||||
|
||||
def sign_in_path
|
||||
if ENV.fetch('OSEM_ICHAIN_ENABLED', nil) == 'true'
|
||||
new_user_ichain_session_path
|
||||
else
|
||||
new_user_session_path
|
||||
end
|
||||
end
|
||||
|
||||
def rescheduling_hint(affected_event_count)
|
||||
if affected_event_count > 0
|
||||
"You have #{affected_event_count} scheduled #{'event'.pluralize(affected_event_count)}. Changing the conference hours will unschedule those scheduled outside the conference hours."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue