template_name = 'projectrequest_view.html'
def getAuthorities(self, request):
- authorities_query = Query.get('authority').select('name', 'authority_hrn')
+ if self.theme == 'fed4fire':
+ authorities_query = Query.get('myslice:authority').select('name', 'authority_hrn')
+ else:
+ authorities_query = Query.get('authority').select('name', 'authority_hrn')
authorities = execute_admin_query(request, authorities_query)
if authorities is not None:
# Remove the root authority from the list
if is_pi(wsgi_request, user_hrn, user_authority):
# PIs can directly create/join project in their own authority...
if 'join' in wsgi_request.POST:
+ # join existing project
authority_add_pis(wsgi_request, post['project_name'], user_hrn)
else:
+ # Create project
hrn = post['authority_hrn'] + '.' + post['project_name']
sfa_add_authority(wsgi_request, {'authority_hrn':hrn})
authority_add_pis(wsgi_request, hrn, user_hrn)