From 1b56f8fd44156b0283a3e53736e2a77e18ac3990 Mon Sep 17 00:00:00 2001 From: helmutm Date: Tue, 12 Oct 2010 09:07:00 +0000 Subject: [PATCH] provide additional allocation predicate 'isowner' git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@4035 fd906abe-77d9-0310-91a1-e0d9ade77398 --- browser/common.py | 2 +- organize/browser/party.py | 6 ++++-- security/common.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/browser/common.py b/browser/common.py index 8a0768a..627b931 100644 --- a/browser/common.py +++ b/browser/common.py @@ -636,7 +636,7 @@ class BaseView(GenericView, I18NView): jsCall = ('dojo.require("dojo.parser"); ' 'dojo.registerModulePath("jocy", "/@@/cybertools.jocy"); ' 'dojo.require("jocy.data");') - cm.register('js-execute', jsCall, jsCall=jsCall) + cm.register('js-execute', 'dojo_registration', jsCall=jsCall) cm.register('css', identifier='Lightbox.css', position=0, resourceName='ajax.dojo/dojox/image/resources/Lightbox.css', media='all') diff --git a/organize/browser/party.py b/organize/browser/party.py index 0a73282..f4529af 100644 --- a/organize/browser/party.py +++ b/organize/browser/party.py @@ -114,8 +114,10 @@ class EditPersonForm(EditConceptForm): types = list(self.typeManager.listTypes(include=('workspace',))) #assigned = [r.context for r in self.assignments] #types = [t for t in types if t.typeProvider not in assigned] - return [dict(title=t.title, token=t.tokenForSearch, - predicates=['standard', 'ismember', 'ismaster']) for t in types] + predicates = [n for n in ['standard', 'ismember', 'ismaster', 'iswoner'] + if n in self.conceptManager] + return [dict(title=t.title, token=t.tokenForSearch, predicates=predicates) + for t in types] diff --git a/security/common.py b/security/common.py index 86ae3f7..615496c 100644 --- a/security/common.py +++ b/security/common.py @@ -61,7 +61,7 @@ localPermissions = ('zope.ManageContent', 'zope.View', 'loops.ManageWorkspaces', acquiringPredicateNames = ('hasType', 'standard', 'ownedby', 'ispartof') -allocationPredicateNames = ('ismaster', 'ismember') +allocationPredicateNames = ('isowner', 'ismaster', 'ismember',) workspaceGroupsFolderName = 'gloops_ws'