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):
|
def view(self):
|
||||||
return 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):
|
class BaseMemberRegistration(NodeView):
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,12 @@
|
||||||
<h2 i18n:translate="">Actions</h2>
|
<h2 i18n:translate="">Actions</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="change_password.html"
|
<a tal:condition="item/extUserLink" target="_blank"
|
||||||
i18n:translate="">Change Password</a></li>
|
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')">
|
<li tal:condition="python:item.globalOptions('organize.useFilters')">
|
||||||
<a href="edit_filters.html"
|
<a href="edit_filters.html"
|
||||||
i18n:translate="">Edit Filters</a></li>
|
i18n:translate="">Edit Filters</a></li>
|
||||||
|
|
Loading…
Add table
Reference in a new issue