using the 'user' information in the the "tool config file"
Hi By accident, my colleague found out, that we can use the $userEmail variable in the 'command' tag of the "tool config file", eg: <command interpreter="perl">script.pl $input $userEmail $output </command> Access to the 'user' information ('Anonymous' or the user's e-mail address if logged in) is very handy, as it gives the potential to execute the script differently depending on the value of $userEmail . Now, we would like to use the 'user' information in order to create different options in the interface for the tool, eg: <inputs> <param name="input" type="select" label="available files" display="radio" dynamic_options="ds_Options()"/> </inputs> <outputs> <data format="fasta" name="output"/> </outputs> <code file="more_code.py" /> where "ds_Options()" is defined in the extra python code "more_code.py" I can pass a value to "ds_Options()" which we get as an example from a first page of the interface, eg: <inputs> <page> <param name="dir" type="select" display="radio"> <option value="foo">FOO</option> <option value="bar">BAR</option> </param> </page> <page> <param name="input" type="select" label="available files" display="radio" dynamic_options="ds_Options(dir)"/> </page> </inputs> <outputs> <data format="fasta" name="output"/> </outputs> <code file="more_code.py" /> ...but how do I pass just the 'user' information to the function? As I can use '$userEmail' in the 'command' tag, I tried (with my limited understanding of galaxy and python) the obvious: dynamic_options="ds_Options(userEmail)" but I get NameError: name 'userEmail' is not defined Is there any way to pass the 'user' information? Alternatively, is there a direct way to get access to the 'user' information within the function? Thank you very much for your help Hans
Hello Hans, Tools are not tightly integrated with the Galaxy framework by design. Galaxy provides an interface to tools, but every tool can also be run from the command lines as a stand-alone component. Because of this, distributed tools do not depend on specific Galaxy entities like a Galaxy user, and the distributed Galaxy framework does not enable this. You could decide to add your own logic to enable this for your local instance, however. On Dec 8, 2009, at 5:12 AM, Hotz, Hans-Rudolf wrote:
Hi
By accident, my colleague found out, that we can use the $userEmail variable in the 'command' tag of the "tool config file", eg:
<command interpreter="perl">script.pl $input $userEmail $output </ command>
Access to the 'user' information ('Anonymous' or the user's e-mail address if logged in) is very handy, as it gives the potential to execute the script differently depending on the value of $userEmail .
Now, we would like to use the 'user' information in order to create different options in the interface for the tool, eg:
<inputs> <param name="input" type="select" label="available files" display="radio" dynamic_options="ds_Options()"/> </inputs> <outputs> <data format="fasta" name="output"/> </outputs> <code file="more_code.py" />
where "ds_Options()" is defined in the extra python code "more_code.py"
I can pass a value to "ds_Options()" which we get as an example from a first page of the interface, eg:
<inputs> <page> <param name="dir" type="select" display="radio"> <option value="foo">FOO</option> <option value="bar">BAR</option> </param> </page> <page> <param name="input" type="select" label="available files" display="radio" dynamic_options="ds_Options(dir)"/> </page> </inputs> <outputs> <data format="fasta" name="output"/> </outputs> <code file="more_code.py" />
...but how do I pass just the 'user' information to the function?
As I can use '$userEmail' in the 'command' tag, I tried (with my limited understanding of galaxy and python) the obvious:
dynamic_options="ds_Options(userEmail)"
but I get
NameError: name 'userEmail' is not defined
Is there any way to pass the 'user' information?
Alternatively, is there a direct way to get access to the 'user' information within the function?
Thank you very much for your help
Hans
_______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
Greg Von Kuster Galaxy Development Team greg@bx.psu.edu
Hi, Following up on this thread, I have a related question regarding the use of user names. I was wondering if I can configure an instance to restrict the list of available tools defined in tool_conf.xml depending on the user name (or ideally group) of the currently logged in user. We would like to set up a public Galaxy instance that also hosts a few tools that would only be available to a particular user group. Our alternative would be to create two Galaxy instances (one for each user group) but I was hoping to avoid the duplication if possible. Thanks, Martin Aryee. On Fri, Dec 18, 2009 at 11:13 AM, Greg Von Kuster <greg@bx.psu.edu> wrote:
Hello Hans, Tools are not tightly integrated with the Galaxy framework by design. Galaxy provides an interface to tools, but every tool can also be run from the command lines as a stand-alone component. Because of this, distributed tools do not depend on specific Galaxy entities like a Galaxy user, and the distributed Galaxy framework does not enable this. You could decide to add your own logic to enable this for your local instance, however.
On Dec 8, 2009, at 5:12 AM, Hotz, Hans-Rudolf wrote:
Hi By accident, my colleague found out, that we can use the $userEmail variable in the 'command' tag of the "tool config file", eg: <command interpreter="perl">script.pl $input $userEmail $output </command> Access to the 'user' information ('Anonymous' or the user's e-mail address if logged in) is very handy, as it gives the potential to execute the script differently depending on the value of $userEmail .
Now, we would like to use the 'user' information in order to create different options in the interface for the tool, eg: <inputs> <param name="input" type="select" label="available files" display="radio" dynamic_options="ds_Options()"/> </inputs> <outputs> <data format="fasta" name="output"/> </outputs> <code file="more_code.py" />
where "ds_Options()" is defined in the extra python code "more_code.py"
I can pass a value to "ds_Options()" which we get as an example from a first page of the interface, eg: <inputs> <page> <param name="dir" type="select" display="radio"> <option value="foo">FOO</option> <option value="bar">BAR</option> </param> </page> <page> <param name="input" type="select" label="available files" display="radio" dynamic_options="ds_Options(dir)"/> </page> </inputs> <outputs> <data format="fasta" name="output"/> </outputs> <code file="more_code.py" />
...but how do I pass just the 'user' information to the function?
As I can use '$userEmail' in the 'command' tag, I tried (with my limited understanding of galaxy and python) the obvious: dynamic_options="ds_Options(userEmail)" but I get NameError: name 'userEmail' is not defined
Is there any way to pass the 'user' information? Alternatively, is there a direct way to get access to the 'user' information within the function?
Thank you very much for your help
Hans _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
Martin Aryee wrote:
Hi,
Following up on this thread, I have a related question regarding the use of user names. I was wondering if I can configure an instance to restrict the list of available tools defined in tool_conf.xml depending on the user name (or ideally group) of the currently logged in user. We would like to set up a public Galaxy instance that also hosts a few tools that would only be available to a particular user group. Our alternative would be to create two Galaxy instances (one for each user group) but I was hoping to avoid the duplication if possible.
Hi Martin, There's no way to do this directly in Galaxy, so two instances would be necessary. However, you can run two instances using the same database, which should remove some of the management overhead and make the same data available in both instances. In addition, with some proxy server magic, the appropriate galaxy server can be chosen based on the logged in user, meaning you won't need two different URLs. --nate
Thanks, Martin Aryee.
On Fri, Dec 18, 2009 at 11:13 AM, Greg Von Kuster <greg@bx.psu.edu> wrote:
Hello Hans, Tools are not tightly integrated with the Galaxy framework by design. Galaxy provides an interface to tools, but every tool can also be run from the command lines as a stand-alone component. Because of this, distributed tools do not depend on specific Galaxy entities like a Galaxy user, and the distributed Galaxy framework does not enable this. You could decide to add your own logic to enable this for your local instance, however.
On Dec 8, 2009, at 5:12 AM, Hotz, Hans-Rudolf wrote:
Hi By accident, my colleague found out, that we can use the $userEmail variable in the 'command' tag of the "tool config file", eg: <command interpreter="perl">script.pl $input $userEmail $output </command> Access to the 'user' information ('Anonymous' or the user's e-mail address if logged in) is very handy, as it gives the potential to execute the script differently depending on the value of $userEmail .
Now, we would like to use the 'user' information in order to create different options in the interface for the tool, eg: <inputs> <param name="input" type="select" label="available files" display="radio" dynamic_options="ds_Options()"/> </inputs> <outputs> <data format="fasta" name="output"/> </outputs> <code file="more_code.py" />
where "ds_Options()" is defined in the extra python code "more_code.py"
I can pass a value to "ds_Options()" which we get as an example from a first page of the interface, eg: <inputs> <page> <param name="dir" type="select" display="radio"> <option value="foo">FOO</option> <option value="bar">BAR</option> </param> </page> <page> <param name="input" type="select" label="available files" display="radio" dynamic_options="ds_Options(dir)"/> </page> </inputs> <outputs> <data format="fasta" name="output"/> </outputs> <code file="more_code.py" />
...but how do I pass just the 'user' information to the function?
As I can use '$userEmail' in the 'command' tag, I tried (with my limited understanding of galaxy and python) the obvious: dynamic_options="ds_Options(userEmail)" but I get NameError: name 'userEmail' is not defined
Is there any way to pass the 'user' information? Alternatively, is there a direct way to get access to the 'user' information within the function?
Thank you very much for your help
Hans _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
_______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
Hello,
Martin Aryee wrote:
We would like to set up a public Galaxy instance that also hosts a few tools that would only be available to a particular user group.
For our local Galaxy server we needed something similar, and came up with the attached patch. For every tool executed, it calls a function with the tool id, user email and the function returns true/false if the user is allowed to run the tool. This is only a stop-gap solution until Galaxy supports per-tool security. You'll need to add your own python code for the permission logic, and unfortunately it will be hard coded. The message the users will see is also not very pretty, but it works. The log will show which tools are allowed and which ones are blocked (with the tool-id and user email). The patch is also available here: http://cancan.cshl.edu/labmembers/gordon/files/galaxy_per_tool_security.patc... (if it got mangled in the email). comments are welcomed, -gordon
Hello Martin, I've opened the following ticket for this request, you can "follow" the ticket in bitbucket if you want. http://bitbucket.org/galaxy/galaxy-central/issue/269/use-galaxy- security-to-restrict-tool-availability-to-groups Thanks very much fro this request and you interest in Galaxy. On Jan 4, 2010, at 9:42 AM, Nate Coraor wrote:
Martin Aryee wrote:
Hi, Following up on this thread, I have a related question regarding the use of user names. I was wondering if I can configure an instance to restrict the list of available tools defined in tool_conf.xml depending on the user name (or ideally group) of the currently logged in user. We would like to set up a public Galaxy instance that also hosts a few tools that would only be available to a particular user group. Our alternative would be to create two Galaxy instances (one for each user group) but I was hoping to avoid the duplication if possible.
Hi Martin,
There's no way to do this directly in Galaxy, so two instances would be necessary. However, you can run two instances using the same database, which should remove some of the management overhead and make the same data available in both instances.
In addition, with some proxy server magic, the appropriate galaxy server can be chosen based on the logged in user, meaning you won't need two different URLs.
--nate
Thanks, Martin Aryee. On Fri, Dec 18, 2009 at 11:13 AM, Greg Von Kuster <greg@bx.psu.edu> wrote:
Hello Hans, Tools are not tightly integrated with the Galaxy framework by design. Galaxy provides an interface to tools, but every tool can also be run from the command lines as a stand-alone component. Because of this, distributed tools do not depend on specific Galaxy entities like a Galaxy user, and the distributed Galaxy framework does not enable this. You could decide to add your own logic to enable this for your local instance, however.
On Dec 8, 2009, at 5:12 AM, Hotz, Hans-Rudolf wrote:
Hi By accident, my colleague found out, that we can use the $userEmail variable in the 'command' tag of the "tool config file", eg: <command interpreter="perl">script.pl $input $userEmail $output </ command> Access to the 'user' information ('Anonymous' or the user's e- mail address if logged in) is very handy, as it gives the potential to execute the script differently depending on the value of $userEmail .
Now, we would like to use the 'user' information in order to create different options in the interface for the tool, eg: <inputs> <param name="input" type="select" label="available files" display="radio" dynamic_options="ds_Options()"/> </inputs> <outputs> <data format="fasta" name="output"/> </outputs> <code file="more_code.py" />
where "ds_Options()" is defined in the extra python code "more_code.py"
I can pass a value to "ds_Options()" which we get as an example from a first page of the interface, eg: <inputs> <page> <param name="dir" type="select" display="radio"> <option value="foo">FOO</option> <option value="bar">BAR</option> </param> </page> <page> <param name="input" type="select" label="available files" display="radio" dynamic_options="ds_Options(dir)"/> </page> </inputs> <outputs> <data format="fasta" name="output"/> </outputs> <code file="more_code.py" />
...but how do I pass just the 'user' information to the function?
As I can use '$userEmail' in the 'command' tag, I tried (with my limited understanding of galaxy and python) the obvious: dynamic_options="ds_Options(userEmail)" but I get NameError: name 'userEmail' is not defined
Is there any way to pass the 'user' information? Alternatively, is there a direct way to get access to the 'user' information within the function?
Thank you very much for your help
Hans _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
_______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
Greg Von Kuster Galaxy Development Team greg@bx.psu.edu
participants (5)
-
Assaf Gordon
-
Greg Von Kuster
-
Hotz, Hans-Rudolf
-
Martin Aryee
-
Nate Coraor