add link to oidc in user profile

This commit is contained in:
Cayo Puigdefabregas 2023-05-16 10:05:50 +02:00
parent 3cf87f7f95
commit 7a128e6e7f
2 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,11 @@
<li class="nav-item"> <li class="nav-item">
<button class="nav-link" data-bs-toggle="tab" data-bs-target="#profile-sanitization-entity">Sanitization Entity</button> <button class="nav-link" data-bs-toggle="tab" data-bs-target="#profile-sanitization-entity">Sanitization Entity</button>
</li> </li>
{% if oidc %}
<li class="nav-item">
<a href="{{ url_for('oidc.create_client') }}" class="nav-link">OpenID Connect</a>
</li>
{% endif %}
</ul> </ul>
<div class="tab-content pt-2"> <div class="tab-content pt-2">

View File

@ -104,11 +104,13 @@ class UserProfileView(GenericMixin):
if g.user.sanitization_entity: if g.user.sanitization_entity:
sanitization = g.user.sanitization_entity sanitization = g.user.sanitization_entity
sanitization_form = SanitizationEntityForm(obj=sanitization) sanitization_form = SanitizationEntityForm(obj=sanitization)
oidc = 'oidc' in app.blueprints.keys()
self.context.update( self.context.update(
{ {
'current_user': current_user, 'current_user': current_user,
'password_form': PasswordForm(), 'password_form': PasswordForm(),
'sanitization_form': sanitization_form, 'sanitization_form': sanitization_form,
'oidc': oidc,
} }
) )