X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fvalidationview.py;h=b87a250fd8d612a454b32bc5d7be58ce0d1798d7;hb=472832e915d739baf6950262c01d86effe0ae089;hp=f8788d033d31a41ff3fb42d7aebe0dc6dd2d1713;hpb=02fa4822888c7c43cf6fd75ab6740ec5fac40cb7;p=unfold.git diff --git a/portal/validationview.py b/portal/validationview.py index f8788d03..b87a250f 100644 --- a/portal/validationview.py +++ b/portal/validationview.py @@ -50,6 +50,7 @@ class ValidatePendingView(LoginRequiredAutoLogoutView, ThemeView): template_name = "validate_pending.html" def get_context_data(self, **kwargs): + pi = "" # We might have slices on different registries with different user accounts # We note that this portal could be specific to a given registry, to which we register users, but i'm not sure that simplifies things # Different registries mean different identities, unless we identify via SFA HRN or have associated the user email to a single hrn @@ -150,7 +151,7 @@ class ValidatePendingView(LoginRequiredAutoLogoutView, ThemeView): # ** Where am I a PI ** # For this we need to ask SFA (of all authorities) = PI function - pi_authorities_query = Query.get('user').filter_by('user_hrn', '==', '$user_hrn').select('pi_authorities') + pi_authorities_query = Query.get('myslice:user').filter_by('user_hrn', '==', '$user_hrn').select('pi_authorities') pi_authorities_tmp = execute_query(self.request, pi_authorities_query) pi_authorities = set() try: @@ -256,9 +257,11 @@ class ValidatePendingView(LoginRequiredAutoLogoutView, ThemeView): if not auth_hrn in dest: dest[auth_hrn] = [] - dest[auth_hrn].append(request) + dest[auth_hrn].append(request) context = super(ValidatePendingView, self).get_context_data(**kwargs) + print "testing" + print ctx_my_authorities context['my_authorities'] = ctx_my_authorities context['sub_authorities'] = ctx_sub_authorities context['delegation_authorities'] = ctx_delegation_authorities @@ -270,7 +273,7 @@ class ValidatePendingView(LoginRequiredAutoLogoutView, ThemeView): context['topmenu_items'] = topmenu_items_live('Validation', page) # so we can sho who is logged context['username'] = the_user(self.request) - + context['pi'] = "is_pi" context['theme'] = self.theme context['section'] = "Requests" # XXX We need to prepare the page for queries