Salsa login works

This commit is contained in:
Christoph Haas 2021-02-27 23:50:51 +01:00
parent b2ed771663
commit bc507cbe39
6 changed files with 84 additions and 51 deletions

View file

@ -11,29 +11,30 @@ class User < ApplicationRecord
# :validatable,
:timeoutable,
# :lockable,
:omniauthable, :omniauth_providers => [
:launchpad,
:stackexchange,
:google_oauth2,
:amazon,
:github
:omniauthable, omniauth_providers: [
:salsa,
# :launchpad,
# :stackexchange,
# :google_oauth2,
# :amazon,
# :github
]
# Return a human-friendly string describing the user's SSO provider
def pretty_provider
case self.provider
when 'launchpad'
'Ubuntu One/Launchpad'
when 'stackexchange'
'StackExchange'
when 'google_oauth2'
'Google'
when 'amazon'
'Amazon'
when 'github'
'GitHub'
when 'debian-sso'
'Debian single-sign-on'
# when 'launchpad'
# 'Ubuntu One/Launchpad'
# when 'stackexchange'
# 'StackExchange'
# when 'google_oauth2'
# 'Google'
# when 'amazon'
# 'Amazon'
# when 'github'
# 'GitHub'
when 'salsa'
'salsa.debian.org'
else
'local authentication'
end