comparison webapollo.py @ 6:eb389ee1408e draft

planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit d9f27b297d9a919471c92b02ecf6cc9554457211
author gga
date Tue, 30 Oct 2018 04:29:26 -0400
parents 696a1962212e
children d72192ec8e39
comparison
equal deleted inserted replaced
5:696a1962212e 6:eb389ee1408e
1542 1542
1543 def accessible_organisms(user, orgs): 1543 def accessible_organisms(user, orgs):
1544 permissionMap = { 1544 permissionMap = {
1545 x['organism']: x['permissions'] 1545 x['organism']: x['permissions']
1546 for x in user.organismPermissions 1546 for x in user.organismPermissions
1547 if 'WRITE' in x['permissions'] or 1547 if 'WRITE' in x['permissions'] or 'READ' in x['permissions'] or 'ADMINISTRATE' in x['permissions'] or user.role == 'ADMIN'
1548 'READ' in x['permissions'] or
1549 'ADMINISTRATE' in x['permissions'] or
1550 user.role == 'ADMIN'
1551 } 1548 }
1552 1549
1553 if 'error' in orgs: 1550 if 'error' in orgs:
1554 raise Exception("Error received from Apollo server: \"%s\"" % orgs['error']) 1551 raise Exception("Error received from Apollo server: \"%s\"" % orgs['error'])
1555 1552