[gen] Show a special icon for users that are local copies of external sources.
This commit is contained in:
parent
e344ff51e2
commit
7f88c7cca8
BIN
gen/ui/external.png
Normal file
BIN
gen/ui/external.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 685 B |
|
@ -43,5 +43,7 @@ class GroupWrapper(AbstractWrapper):
|
||||||
# If the group was created by anon, anon can't stay its Owner.
|
# If the group was created by anon, anon can't stay its Owner.
|
||||||
if 'anon' in self.o.__ac_local_roles__:
|
if 'anon' in self.o.__ac_local_roles__:
|
||||||
del self.o.__ac_local_roles__['anon']
|
del self.o.__ac_local_roles__['anon']
|
||||||
|
if 'system' in self.o.__ac_local_roles__:
|
||||||
|
del self.o.__ac_local_roles__['system']
|
||||||
return self._callCustom('onEdit', created)
|
return self._callCustom('onEdit', created)
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
|
@ -85,6 +85,12 @@ class UserWrapper(AbstractWrapper):
|
||||||
(msgPart, self.user.login, login))
|
(msgPart, self.user.login, login))
|
||||||
return newPassword
|
return newPassword
|
||||||
|
|
||||||
|
def setEncryptedPassword(self, encryptedPassword):
|
||||||
|
'''Sets p_encryptedPassword for this user. m_setPassword above starts
|
||||||
|
for a clear (given or generated) password. This one simply sets an
|
||||||
|
already encrypted password for this user.'''
|
||||||
|
self.getZopeUser().__ = encryptedPassword
|
||||||
|
|
||||||
def checkPassword(self, clearPassword):
|
def checkPassword(self, clearPassword):
|
||||||
'''Returns True if p_clearPassword is the correct password for this
|
'''Returns True if p_clearPassword is the correct password for this
|
||||||
user.'''
|
user.'''
|
||||||
|
@ -155,6 +161,12 @@ class UserWrapper(AbstractWrapper):
|
||||||
else: roles.append('Manager')
|
else: roles.append('Manager')
|
||||||
self.roles = roles
|
self.roles = roles
|
||||||
|
|
||||||
|
def getSupTitle(self, nav):
|
||||||
|
'''Display a specific icon if the user is a local copy of an external
|
||||||
|
(ie, ldap) user.'''
|
||||||
|
if self.source == 'zodb': return
|
||||||
|
return '<img src="%s/ui/external.png"/>' % self.o.getTool().getSiteUrl()
|
||||||
|
|
||||||
def onEdit(self, created):
|
def onEdit(self, created):
|
||||||
'''Triggered when a User is created or updated.'''
|
'''Triggered when a User is created or updated.'''
|
||||||
login = self.login
|
login = self.login
|
||||||
|
|
Loading…
Reference in a new issue