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
|
knowledge_macros = knowledge_macros
|
||||||
|
|
||||||
|
adminMaySelectAllInstitutions = True
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def institutionType(self):
|
def institutionType(self):
|
||||||
return self.conceptManager['institution']
|
return self.conceptManager['institution']
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def institutions(self):
|
def institutions(self):
|
||||||
if checkPermission('loops.ManageWorkspaces', self.context):
|
if self.adminMaySelectAllInstitutions:
|
||||||
return self.getAllInstitutions()
|
if checkPermission('loops.ManageWorkspaces', self.context):
|
||||||
|
return self.getAllInstitutions()
|
||||||
result = []
|
result = []
|
||||||
p = getPersonForUser(self.context, self.request)
|
p = getPersonForUser(self.context, self.request)
|
||||||
if p is None:
|
if p is None:
|
||||||
|
|
|
@ -50,6 +50,8 @@ class SurveyView(InstitutionMixin, ConceptView):
|
||||||
|
|
||||||
template = template
|
template = template
|
||||||
|
|
||||||
|
adminMaySelectAllInstitutions = False
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def macro(self):
|
def macro(self):
|
||||||
self.registerDojo()
|
self.registerDojo()
|
||||||
|
|
Loading…
Add table
Reference in a new issue