Thanks, 

I integrated parts of these snippets into our general dynamic_jobs function, 
and it works flawlessly. 

Best, 

Geert
________________________________________
Van: jmchil...@gmail.com [jmchil...@gmail.com] namens John Chilton 
[chil...@msi.umn.edu]
Verzonden: donderdag 19 september 2013 19:42
Aan: Vandeweyer Geert
CC: galaxy-...@bx.psu.edu
Onderwerp: Re: [galaxy-dev] pass user groups to dynamic job runner

Feature request received.

The following changeset demonstrates how one could implement this

https://github.com/jmchilton/galaxy-central/commit/b500a24bc1aa94bef48db20a7cc1f3d68855b7fd

First step is to create a new dynamic job destination, this is
demonstrated in job_conf.xml in the above changeset. This demonstrates
the new style job_conf section - this will need to be adapted for the
old style runners but is still doable.

Then you will want to add a dynamic job runner rule that implements
this logic. This is the file lib/galaxy/jobs/rules/license_checker.py.

This will do what you asked, you can adjust the tools it targets and
the message that gets displayed to the user pretty easily (right now
it is just "No license, no tool").

There is no longer any need to display such tools to the user thanks
to dynamic toolbox filters. This is that last file:
lib/galaxy/tools/filters/license_filter.py. This will prevent any tool
in the list 'LICENSED_TOOLS' from even being seen by unlicensed users.
You do need to specify this filter is being used by adding the line:

tool_filters = license_filter:has_license

in the [app:main] section of universe_wsgi.ini.

Hope this helps!

-John







On Thu, Sep 19, 2013 at 2:45 AM, Vandeweyer Geert
<geert.vandewe...@uantwerpen.be> wrote:
> Hi,
>
> Could somebody point me to the place where I can create a ticket for the 
> following feature:
>
> - We want to have tools available only to users who provided a licence for 
> this tool.
> - To prevent very long email lists (see example on dev-only tools), I'd like 
> to have a group 'have_licence'
> - in dynamic job runner function : check if user is in usergroup : ok => run 
> ; fail => give message.
>
> Or can I hide tools from the menu based on usergroup?
>
> Best,
>
> Geert
> ___________________________________________________________
> 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:
>   http://lists.bx.psu.edu/
>
> To search Galaxy mailing lists use the unified search at:
>   http://galaxyproject.org/search/mailinglists/

___________________________________________________________
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:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Reply via email to