move extUserLink property to BaseView - link to pw change / user data may be used on any page
This commit is contained in:
parent
1b93e6148b
commit
aee5b4a3b3
2 changed files with 7 additions and 7 deletions
|
|
@ -275,6 +275,13 @@ class BaseView(GenericView, I18NView, SortableMixin):
|
|||
def isAnonymous(self):
|
||||
return IUnauthenticatedPrincipal.providedBy(self.request.principal)
|
||||
|
||||
@Lazy
|
||||
def extUserLink(self):
|
||||
from scopes.web.auth.oidc import IExternalPrincipal
|
||||
if IExternalPrincipal.providedBy(self.request.principal):
|
||||
return self.request.principal.extUserLink
|
||||
return None
|
||||
|
||||
def recordAccess(self, viewName, **kw):
|
||||
access.record(self.request, principal=self.principalId, view=viewName, **kw)
|
||||
|
||||
|
|
|
|||
|
|
@ -61,13 +61,6 @@ 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):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue