allow suppression for listing all institutions for workgroup admin, e.g. for surveys
This commit is contained in:
parent
adbdb2840b
commit
5d4a74c528
2 changed files with 7 additions and 2 deletions
|
@ -78,14 +78,17 @@ class InstitutionMixin(object):
|
|||
|
||||
knowledge_macros = knowledge_macros
|
||||
|
||||
adminMaySelectAllInstitutions = True
|
||||
|
||||
@Lazy
|
||||
def institutionType(self):
|
||||
return self.conceptManager['institution']
|
||||
|
||||
@Lazy
|
||||
def institutions(self):
|
||||
if checkPermission('loops.ManageWorkspaces', self.context):
|
||||
return self.getAllInstitutions()
|
||||
if self.adminMaySelectAllInstitutions:
|
||||
if checkPermission('loops.ManageWorkspaces', self.context):
|
||||
return self.getAllInstitutions()
|
||||
result = []
|
||||
p = getPersonForUser(self.context, self.request)
|
||||
if p is None:
|
||||
|
|
|
@ -50,6 +50,8 @@ class SurveyView(InstitutionMixin, ConceptView):
|
|||
|
||||
template = template
|
||||
|
||||
adminMaySelectAllInstitutions = False
|
||||
|
||||
@Lazy
|
||||
def macro(self):
|
||||
self.registerDojo()
|
||||
|
|
Loading…
Add table
Reference in a new issue