personal information: with link to OIDC provider if logged-in via OIDC
This commit is contained in:
parent
7615bdd746
commit
a09410f853
2 changed files with 13 additions and 2 deletions
|
@ -60,6 +60,13 @@ class PersonalInfo(ConceptView):
|
|||
def view(self):
|
||||
return self
|
||||
|
||||
@Lazy
|
||||
def extUserLink(self):
|
||||
from scopes.web.auth.oidc import IExternalPrincipal
|
||||
if IExternalPrincipal.providedBy(self.request.principal):
|
||||
return self.request.principal.extUserLink
|
||||
return None
|
||||
|
||||
|
||||
class BaseMemberRegistration(NodeView):
|
||||
|
||||
|
|
|
@ -51,8 +51,12 @@
|
|||
<h2 i18n:translate="">Actions</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="change_password.html"
|
||||
i18n:translate="">Change Password</a></li>
|
||||
<a tal:condition="item/extUserLink" target="_blank"
|
||||
tal:attributes="href item/extUserLink"
|
||||
i18n:translate="edit-external-user">View/Edit User Account</a>
|
||||
<a tal:condition="not:item/extUserLink"
|
||||
href="change_password.html" i18n:translate="">Change Password</a>
|
||||
</li>
|
||||
<li tal:condition="python:item.globalOptions('organize.useFilters')">
|
||||
<a href="edit_filters.html"
|
||||
i18n:translate="">Edit Filters</a></li>
|
||||
|
|
Loading…
Add table
Reference in a new issue