mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Provide a helper to point to sign up/in for different configs
This commit is contained in:
parent
2c98ba9711
commit
a9581445f3
2 changed files with 17 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ module Admin
|
|||
|
||||
def verify_user_admin
|
||||
if (current_user.nil?)
|
||||
redirect_to new_user_session_path
|
||||
redirect_to sign_in_path
|
||||
return false
|
||||
end
|
||||
unless (current_user.has_role? :organizer, :any) || (current_user.has_role? :cfp, :any) ||
|
||||
|
|
|
|||
|
|
@ -211,4 +211,20 @@ module ApplicationHelper
|
|||
false
|
||||
end
|
||||
end
|
||||
|
||||
def sign_in_path
|
||||
if CONFIG['authentication']['ichain']['enabled']
|
||||
new_user_ichain_session_path
|
||||
else
|
||||
new_user_session_path
|
||||
end
|
||||
end
|
||||
|
||||
def sign_up_path
|
||||
if CONFIG['authentication']['ichain']['enabled']
|
||||
new_user_ichain_registration_path
|
||||
else
|
||||
new_user_registration_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue