platform_ids.append(sfa_platform['platform_id'])
print "W: Hardcoding platform myslice"
- platform_ids.append(5);
+ # There has been a tweak on how new platforms are referencing a
+ # so-called 'myslice' platform for storing authentication tokens.
+ # XXX This has to be removed in final versions.
+ myslice_platforms_query = Query().get('local:platform').filter_by('platform', '==', 'myslice').select('platform_id')
+ myslice_platforms = execute_query(self.request, myslice_platforms_query)
+ if myslice_platforms:
+ myslice_platform, = myslice_platforms
+ platform_ids.append(myslice_platform['platform_id'])
# We can check on which the user has authoritity credentials = PI rights
credential_authorities = set()
# ** Where am I a PI **
# For this we need to ask SFA (of all authorities) = PI function
- pi_authorities_query = Query.get('ple:user').filter_by('user_hrn', '==', '$user_hrn').select('pi_authorities')
+ pi_authorities_query = Query.get('user').filter_by('user_hrn', '==', '$user_hrn').select('pi_authorities')
pi_authorities_tmp = execute_query(self.request, pi_authorities_query)
pi_authorities = set()
for pa in pi_authorities_tmp: