allow suppression for listing all institutions for workgroup admin, e.g. for surveys

This commit is contained in:
Helmut Merz 2015-04-20 10:12:29 +02:00
parent adbdb2840b
commit 5d4a74c528
2 changed files with 7 additions and 2 deletions

View file

@ -78,12 +78,15 @@ class InstitutionMixin(object):
knowledge_macros = knowledge_macros
adminMaySelectAllInstitutions = True
@Lazy
def institutionType(self):
return self.conceptManager['institution']
@Lazy
def institutions(self):
if self.adminMaySelectAllInstitutions:
if checkPermission('loops.ManageWorkspaces', self.context):
return self.getAllInstitutions()
result = []

View file

@ -50,6 +50,8 @@ class SurveyView(InstitutionMixin, ConceptView):
template = template
adminMaySelectAllInstitutions = False
@Lazy
def macro(self):
self.registerDojo()