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,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 = []
|
||||
|
|
|
@ -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