X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fprojectrequestview.py;h=fdccd16d036502a7fea0cc6e64dc21dd7abf689f;hb=4266c3dad7f75def7a82267dba06b12fdd185434;hp=69941b321841005da0991fb8bef97a0a0742f9be;hpb=db5979f2fce0bb22fca29552f47c26be9654b917;p=unfold.git diff --git a/portal/projectrequestview.py b/portal/projectrequestview.py index 69941b32..fdccd16d 100644 --- a/portal/projectrequestview.py +++ b/portal/projectrequestview.py @@ -20,17 +20,17 @@ class ProjectRequestView(LoginRequiredAutoLogoutView, ThemeView): template_name = 'projectrequest_view.html' def getAuthorities(self, request): - if self.theme == 'fed4fire': - authorities_query = Query.get('myslice:authority').select('authority_hrn') - else: - authorities_query = Query.get('authority').select('name', 'authority_hrn') + #if self.theme == 'fed4fire': + authorities_query = Query.get('myslice:authority').select('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 matching = [s for s in authorities if "." in s['authority_hrn']] authorities = sorted(matching, key=lambda k: k['authority_hrn']) - if self.theme != 'fed4fire': - authorities = sorted(matching, key=lambda k: k['name']) + #if self.theme != 'fed4fire': + # authorities = sorted(matching, key=lambda k: k['name']) return authorities def getUserAuthority(self, request): @@ -140,7 +140,7 @@ class ProjectRequestView(LoginRequiredAutoLogoutView, ThemeView): if not errors: logger.info("is_pi on auth_hrn = {}".format(user_authority)) - if is_pi(wsgi_request, user_hrn, user_authority): + if is_pi(wsgi_request, user_hrn, post['authority_hrn']): # PIs can directly create/join project in their own authority... if 'join' in wsgi_request.POST: # join existing project