[gen] Created param config.groupsForGlobalRoles that disabled by default creation of a group for every global role. On a appy class it is now possible to define a static method 'generateUid' that generates a UID for every instance of this class, instead of using the standard Appy way to produce such UIDs. [shared] dav.Resource: allow to retrieve the result encoded or not in utf8.

This commit is contained in:
Gaetan Delannay 2013-07-23 17:07:27 +02:00
parent d385b8514e
commit 88bd5e5bce
9 changed files with 42 additions and 20 deletions

View file

@ -9,7 +9,7 @@ class GroupWrapper(AbstractWrapper):
def showLogin(self):
'''When must we show the login field?'''
if self.o.isTemporary(): return 'edit'
return 'view'
return ('view', 'result')
def showGroups(self):
'''Only the admin can view or edit roles.'''

View file

@ -134,7 +134,11 @@ class UserWrapper(AbstractWrapper):
return self._callCustom('validate', new, errors)
def onEdit(self, created):
self.title = self.login
# Set a title for this user.
if self.firstName and self.name:
self.title = '%s %s' % (self.name, self.firstName)
else:
self.title = self.login
aclUsers = self.o.acl_users
login = self.login
if created: