account_config = json.loads(account_detail['config'])
if 'myslice' in platform_detail['platform']:
acc_auth_cred = account_config.get('delegated_authority_credentials','N/A')
+ acc_user_cred = account_config.get('delegated_user_credential','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
+ # check if the user has creds or not
+ if acc_user_cred == {} or acc_user_cred == 'N/A':
+ user_cred = 'no_creds'
+ else:
+ user_cred = 'has_creds'
+
+
+ env['pi'] = pi
+ env['user_cred'] = user_cred
else:
env['person'] = None
return render_to_response(self.template,env, context_instance=RequestContext(request))
account_config = json.loads(account_detail['config'])
if 'myslice' in platform_detail['platform']:
acc_auth_cred = account_config.get('delegated_authority_credentials','N/A')
+ acc_user_cred = account_config.get('delegated_user_credential','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
+ # check if the user has creds or not
+ if acc_user_cred == {} or acc_user_cred == 'N/A':
+ user_cred = 'no_creds'
+ else:
+ user_cred = 'has_creds'
+
+
+ env['pi'] = pi
+ env['user_cred'] = user_cred
env['person'] = self.request.user
else:
env['person'] = None