Question: Limiting User Access to specific Tools
0
gravatar for ali
4.2 years ago by
ali20
Canada
ali20 wrote:

How can I limit user access to a specific tool

I can do this for datasets using the admin menu, but how can i prevent a user to access a tool, or rather, only allow certain users to access a tool

galaxy permissions • 1.1k views
ADD COMMENTlink modified 4.2 years ago by Dannon Baker3.7k • written 4.2 years ago by ali20
1
gravatar for Dannon Baker
4.2 years ago by
Dannon Baker3.7k
United States
Dannon Baker3.7k wrote:

While it's not currently possible to technically completely disable particular tools for individuals or a set of users, you can mask them out of the toolbox using admin-side toolbox filters.  See https://wiki.galaxyproject.org/UserDefinedToolboxFilters for more details.

ADD COMMENTlink written 4.2 years ago by Dannon Baker3.7k

if the tool calls upon a script using the <command> tag

are there env variables that are present that can reveal to me the user that is logged in?

ADD REPLYlink written 4.2 years ago by ali20
1

I would keep this logic out of your tool and filter at the job destination level with the recipe laid out on this page: https://wiki.galaxyproject.org/Admin/Config/Access%20Control.

ADD REPLYlink written 4.2 years ago by jmchilton1.1k

This is a much better idea than adding it at the tool level, now that dynamic job destinations are this flexible!

ADD REPLYlink written 4.2 years ago by Dannon Baker3.7k

Not env vars, but if you check out a few of the examples on that page (in particular the restrict_development_tools mapping, sounds like something you'd use as an baseline filter) you'll see that filters have a 'context' with access to trans.user, so you can get the user with context.trans.user

ADD REPLYlink written 4.2 years ago by Dannon Baker3.7k

Ahh, and I just realized what you were actually asking.  So, instead (or in addition to) filtering tools out of the toolbox you want the tool itself to check for access permissions?

You can do this (leveraging an external list) using the $__user_email__ or $__user_id__ variables.  See Reserved Variables section on https://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax

ADD REPLYlink written 4.2 years ago by Dannon Baker3.7k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 179 users visited in the last hour