X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fsupportview.py;h=23bcf7635ba1ef0025359ed1d1c8274f0b94c2c4;hb=89af8babd28a7da90ffe59be3ce7b7e812734cd0;hp=80653e82474f39c33d1b4ef2f8bf4b6a19900149;hpb=b3ede7e149682b5ff4e86ce948ae73681aaed9a0;p=myslice.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))