Re: [galaxy-dev] Galaxy Tool permission/Access
On 09/19/2011 04:35 PM, sohkhan@notes.cc.sunysb.edu wrote:
Hi,
I am wondering if there is way to manage user access to Galaxy tools?
I.E, certain users are restricted to use certain tools. Thanks.
Hi Sohail We use a 'quick and dirty' solution by enforcing log-in and then taking advantage of the reserved variables "$__user_email__" (see: http://wiki.g2.bx.psu.edu/Admin/Tools/Tool%20Config%20Syntax) add "$__user_email__" to the command line, eg: <command interpreter="perl"> access_data.pl $dir $userEmail $output </command> and then use a little wrapper, or do the test in the script itself, eg: my $priv_user = "geek\@fmi.ch"; my $file = $ARGV[0]; my $user = $ARGV[1]; unless ($user eq $priv_user) { print "you don't have access to this data"; exit; } open (FILE, "$file"); ... of coursde, instead of hard coding, you can expand this by using a little database where you store all the 'privileged users'. Regards, Hans
-Sohail
___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at:
participants (1)
-
Hotz, Hans-Rudolf