X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fsupportview.py;h=23bcf7635ba1ef0025359ed1d1c8274f0b94c2c4;hb=81e73becc2f47d96de6cf9f94ba4c86f710a18ba;hp=80653e82474f39c33d1b4ef2f8bf4b6a19900149;hpb=a8104de58940697d33f0f38cb3c866b7ecf6f4f4;p=unfold.git diff --git a/portal/supportview.py b/portal/supportview.py index 80653e82..23bcf763 100644 --- a/portal/supportview.py +++ b/portal/supportview.py @@ -31,24 +31,6 @@ class SupportView (FreeAccessView, ThemeView): if request.user.is_authenticated(): env['person'] = self.request.user - ## check user is pi or not - platform_query = Query().get('local:platform').select('platform_id','platform','gateway_type','disabled') - account_query = Query().get('local:account').select('user_id','platform_id','auth_type','config') - platform_details = execute_query(self.request, platform_query) - account_details = execute_query(self.request, account_query) - for platform_detail in platform_details: - for account_detail in account_details: - if platform_detail['platform_id'] == account_detail['platform_id']: - if 'config' in account_detail and account_detail['config'] is not '': - account_config = json.loads(account_detail['config']) - if 'myslice' in platform_detail['platform']: - acc_auth_cred = account_config.get('delegated_authority_credentials','N/A') - # assigning values - if acc_auth_cred == {} or acc_auth_cred == 'N/A': - pi = "is_not_pi" - else: - pi = "is_pi" - env['pi'] = pi else: env['person'] = None @@ -60,6 +42,6 @@ class SupportView (FreeAccessView, ThemeView): if state: env['state'] = state elif not env['username']: env['state'] = None # use one or two columns for the layout - not logged in users will see the login prompt - + env['request'] = request return render_to_response(self.template, env, context_instance=RequestContext(request))