comparison create_or_update_organism.py @ 7:f9a6e151b3b4 draft

planemo upload for repository https://github.com/TAMU-CPT/galaxy-webapollo commit 52b9e5bf6a6efb09a5cb845ee48703651c644174
author eric-rasche
date Tue, 27 Jun 2017 04:05:17 -0400
parents 7610987e0c48
children
comparison
equal deleted inserted replaced
6:8f76685cdfc8 7:f9a6e151b3b4
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 from __future__ import print_function
2 import sys 3 import sys
3 import json 4 import json
4 import argparse 5 import argparse
5 import time 6 import time
6 from webapollo import WAAuth, WebApolloInstance, OrgOrGuess, GuessOrg, AssertUser 7 from webapollo import WAAuth, WebApolloInstance, OrgOrGuess, GuessOrg, AssertUser
83 84
84 # Group access 85 # Group access
85 if args.group: 86 if args.group:
86 group = wa.groups.loadGroupByName(name=args.group) 87 group = wa.groups.loadGroupByName(name=args.group)
87 res = wa.groups.updateOrganismPermission(group, org_cn, 88 res = wa.groups.updateOrganismPermission(group, org_cn,
88 administrate=False, write=True, read=True, 89 administrate=False, write=True, read=True,
89 export=True) 90 export=True)
90 91
91 data = [o for o in data if o['commonName'] == org_cn] 92 data = [o for o in data if o['commonName'] == org_cn]
92 print(json.dumps(data, indent=2)) 93 print(json.dumps(data, indent=2))