Use URL for idp-initiated SSO in the user dashboard (#7624)
This commit is contained in:
parent
d7987958de
commit
e7bc916ef7
|
@ -16,6 +16,7 @@ from authentic2.constants import AUTHENTICATION_EVENTS_SESSION_KEY
|
|||
from authentic2.manager.views import AjaxFormViewMixin, \
|
||||
ActionMixin, OtherActionsMixin, TitleMixin, Action
|
||||
from authentic2.manager.user_views import UserEditView, UserAddView
|
||||
from authentic2.utils import make_url
|
||||
|
||||
from . import models, tables, forms, constants
|
||||
|
||||
|
@ -387,11 +388,14 @@ def get_service_links(request):
|
|||
if service_instance.service.is_global:
|
||||
name = service_instance.service.name
|
||||
slug = service_instance.service.slug
|
||||
url = service_instance.service.service_url
|
||||
else:
|
||||
name = service_instance.service.name
|
||||
slug = service_instance.slug
|
||||
url = service_instance.service_url
|
||||
if service_instance.metadata_url:
|
||||
url = make_url('a2-idp-saml2-idp-sso',
|
||||
params={'provider_id': service_instance.metadata_url})
|
||||
else:
|
||||
url = service_instance.url
|
||||
service_links.append((name, url, slug, needed_authent))
|
||||
return service_links
|
||||
|
||||
|
|
Reference in New Issue