From 43770d1b1689a3fed4490edfdca64bf8c0c50e9e Mon Sep 17 00:00:00 2001 From: helmutm Date: Mon, 14 Jun 2010 09:59:14 +0000 Subject: [PATCH] show default group name also if workspace information exists but group names are not stored yet git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3897 fd906abe-77d9-0310-91a1-e0d9ade77398 --- security/browser.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/security/browser.py b/security/browser.py index b37209f..33f9143 100644 --- a/security/browser.py +++ b/security/browser.py @@ -244,7 +244,7 @@ class ManageWorkspaceView(PermissionView): gn = {} result = [dict(predicateName=pn, predicateTitle=conceptManager[pn].title, - groupName='', groupExists=False, + groupName=None, groupExists=False, roleParent=False, roleWSI=False) for pn in apn] gfName = self.context.workspaceGroupsFolderName @@ -255,7 +255,10 @@ class ManageWorkspaceView(PermissionView): wsiRMget = IPrincipalRoleManager(self.context).getPrincipalsForRole for item in result: pn = item['predicateName'] - groupName = item['groupName'] = gn.get(pn, getDefaultGroupName(pn)) + groupName = gn.get(pn) + if groupName is None: + groupName = getDefaultGroupName(pn) + item['groupName'] = groupName roleName = 'loops.' + pn.lstrip('is').title() if gf is not None and groupName in gf: item['groupExists'] = True