Mercurial > repos > fubar > brokenandnotdeletablebyowneroradmin
comparison rgToolFactory.py @ 25:8cc3f3c0e539 default tip
Now uses admin_users to check that the user is authorized to run this tool
Docs adjusted.
author | Ross Lazarus <ross.lazarus@gmail.com> |
---|---|
date | Wed, 06 Jun 2012 14:16:25 +1000 |
parents | 0ee2b06ea304 |
children |
comparison
equal
deleted
inserted
replaced
24:8289ebc513ab | 25:8cc3f3c0e539 |
---|---|
36 # There is nothing stopping a malicious user doing whatever they choose | 36 # There is nothing stopping a malicious user doing whatever they choose |
37 # Extremely dangerous!! | 37 # Extremely dangerous!! |
38 # Totally insecure. So, trusted users only | 38 # Totally insecure. So, trusted users only |
39 # | 39 # |
40 # preferred model is a developer using their throw away workstation instance - ie a private site. | 40 # preferred model is a developer using their throw away workstation instance - ie a private site. |
41 # no real risk. | 41 # no real risk. The universe_wsgi.ini admin_users string is checked - only admin users are permitted to run this tool. |
42 # a list in the xml source file is searched for users permitted to run this tool. | |
43 # PUT some IDs in the list in the XML before you restart Galaxy to load this new tool please | |
44 # otherwise, the tool won't run for anybody. | |
45 # | 42 # |
46 | 43 |
47 # | 44 # |
48 # copyright ross lazarus (ross stop lazarus at gmail stop com) May 2012 | 45 # copyright ross lazarus (ross stop lazarus at gmail stop com) May 2012 |
49 # | 46 # |
405 a('--make_HTML',default=None) | 402 a('--make_HTML',default=None) |
406 a('--help_text',default=None) | 403 a('--help_text',default=None) |
407 a('--tool_desc',default=None) | 404 a('--tool_desc',default=None) |
408 a('--new_tool',default=None) | 405 a('--new_tool',default=None) |
409 opts, args = op.parse_args() | 406 opts, args = op.parse_args() |
410 assert not opts.bad_user,'%s is NOT authorized to use this tool. Please ask your friendly admin to add their ID to %s.xml' % (opts.bad_user,os.path.splitext(self.myname)[0]) | 407 assert not opts.bad_user,'%s is NOT authorized to use this tool. Please ask your friendly admin to add their ID to admin_users in universe_wsgi.ini' % (opts.bad_user) |
411 assert opts.tool_name,'## Tool Factory expects a tool name - eg --tool_name=DESeq' | 408 assert opts.tool_name,'## Tool Factory expects a tool name - eg --tool_name=DESeq' |
412 assert opts.interpreter,'## Tool Factory wrapper expects an interpreter - eg --interpreter=Rscript' | 409 assert opts.interpreter,'## Tool Factory wrapper expects an interpreter - eg --interpreter=Rscript' |
413 assert os.path.isfile(opts.script_path),'## Tool Factory wrapper expects a script path - eg --script_path=foo.R' | 410 assert os.path.isfile(opts.script_path),'## Tool Factory wrapper expects a script path - eg --script_path=foo.R' |
414 if opts.output_dir: | 411 if opts.output_dir: |
415 try: | 412 try: |