Hello Akshay,

I have just issued a pull request to Galaxy to allow different toolbox views.

https://bitbucket.org/galaxy/galaxy-central/pull-request/160/implement-dynamic-toolbox-filters/diff

If this gets incorporated, you would need to write some python to
build these views (or filters) and your use case seems particular
difficult, but this should get you part of the way there hopefully.

If you are dynamically creating these tools you just need to mark them
in someway and then create a filter function to dispatch on that
marking. You could give them a special id that encodes the users
e-mail address, for instance give tools ids of the form
<useremail>|<original_id>, then you could create a filter function
like this:

def filter_dynamic_tools( context, tool ):
    tool_id = tool.id
    if not "|" in tool_id:
        return True
   required_user_email = tool_id.split("|")[0]
   return context.trans.user and required_user_email == context.trans.user.email

Alternatively you encode this by adding a requirement tag to the tool
<requirement type="user">b...@example.com</requirement> and setup a
filter function like this:

def filter_dynamic_tools( context, tool ):
   user_requirements = [requirement.name for requirement in
tool.requirements if requirement.type == "user"]
   if not user_requirements:
       return False
   user_email = context.trans.user and context.trans.user.email
   return all([user_email == user_requirements for user_requirement in
user_requirements])

Hope this helps,
-John

On Fri, Mar 29, 2013 at 7:50 AM, Akshay Vivek Choche <acho...@uga.edu> wrote:
> Yes the idea is to give every regular user the possibility to plug custom 
> tool, and yes it may have some security flaws and we would focus on that in 
> later stages. Thats why I was wondering if it possible to create different 
> views of tool_conf.xml for each user, so if one user plugs say WUBLAST which 
> is available as web service, other users won't be able to do so. But from the 
> way things are currently all users share same tool_conf.xml. I hope I didn't 
> confuse you, do tell me if you need any more info from my side.
>
> -Akshay
>
> On Mar 29, 2013, at 2:25 AM, "Bossers, Alex" <alex.boss...@wur.nl> wrote:
>
>> Ok.
>> Yes the rebooting is a pity. However there are opportunities to use tools 
>> without restart by using toolsheds. We are currently investigating that in 
>> more detail. It doesn't work for configs running over the tool-data/*.loc 
>> files though....which is a pity.
>> In the past we used a hack of the system to be able as admin to reload the 
>> tools without rebooot.... this isn't for regular users though.
>>
>> Are you planning to give all users the possibility to plug custom tools? 
>> Won't that be insecure?
>>
>> Cheers
>> Alex
>>
>>
>> -----Oorspronkelijk bericht-----
>> Van: Akshay Vivek Choche [mailto:acho...@uga.edu]
>> Verzonden: donderdag 28 maart 2013 15:22
>> Aan: Bossers, Alex
>> CC: Jennifer Jackson; Galaxy Dev
>> Onderwerp: Re: [galaxy-dev] Knowing who is currently logged into your system
>>
>> Hey Alex,
>>
>> Thanks for the quick response. The reason why I asked this question is 
>> because we reimplemented our plugin WS-Extension tool, which allows users to 
>> import web services as tools in Galaxy. This process involves making changes 
>> to tool_conf.xml, hence the restarting process is required.
>>
>> I also had an extension to this question, is it possible to customize Galaxy 
>> server for each user?, I think its not possible since it implies having 
>> separate tool_conf.xml for each user. I would appreciate if you could 
>> enlighten me on this.
>>
>> Thanks,
>> -Akshay Choche
>>
>> On Mar 28, 2013, at 6:02 AM, "Bossers, Alex" <alex.boss...@wur.nl> wrote:
>>
>>> Akshay
>>> If you have galaxy_reports running on your server you can see the most 
>>> likely logged in users under: "Users/Date of last login" when you query it 
>>> for 0 days. You at least have a login per day (not on the hour though).
>>> For restarting purposes we ignore "viewers" and monitor the running jobs in 
>>> galaxy from the admin interface. Additionally we check with htop on the 
>>> server side of things if galaxy is "very active". Or where you looking for 
>>> some different functionality?
>>> Alex
>>>
>>>
>>> -----Oorspronkelijk bericht-----
>>> Van: galaxy-dev-boun...@lists.bx.psu.edu
>>> [mailto:galaxy-dev-boun...@lists.bx.psu.edu] Namens Jennifer Jackson
>>> Verzonden: donderdag 28 maart 2013 10:29
>>> Aan: Akshay Vivek Choche; Galaxy Dev
>>> Onderwerp: [galaxy-dev] Knowing who is currently logged into your
>>> system
>>>
>>> Hi Akshay,
>>>
>>> I am going to post your question over to the galaxy-...@bx.psu.edu mailing 
>>> list, to give it better viability.
>>>
>>> You could probably run an sql query against a database table to find out 
>>> this information, but there may be a better way. Let's see if someone has a 
>>> method worked out they want to share.
>>>
>>> Another alternative is to look in our documentation, ReadTheDocs. I did a 
>>> search on "login" and a few potentials popped up:
>>> http://galaxy-dist.readthedocs.org/en/latest/
>>>
>>> Going forward, the galaxy-dev list is the list you will want to post
>>> to
>>> - and consider subscribing to - if you are running a local instance and 
>>> want to join/discuss issues with the community of other users doing the 
>>> same.
>>> http://wiki.galaxyproject.org/MailingLists
>>> http://wiki.galaxyproject.org/Support#Mailing_Lists
>>>
>>> Thanks!
>>>
>>> Jen
>>> Galaxy team
>>>
>>> On 3/12/13 5:46 PM, Akshay Vivek Choche wrote:
>>>> Hello All,
>>>>
>>>> I was wondering if there is a way to know all the users logged into your 
>>>> local galaxy server?
>>>>
>>>> Thanks,
>>>> -Akshay Choche
>>>>
>>>> ___________________________________________________________
>>>> The Galaxy User list should be used for the discussion of Galaxy
>>>> analysis and other features on the public server at usegalaxy.org.
>>>> Please keep all replies on the list by using "reply all" in your mail
>>>> client.  For discussion of local Galaxy instances and the Galaxy
>>>> source code, please use the Galaxy Development list:
>>>>
>>>>  http://lists.bx.psu.edu/listinfo/galaxy-dev
>>>>
>>>> To manage your subscriptions to this and other Galaxy lists, please
>>>> use the interface at:
>>>>
>>>>  http://lists.bx.psu.edu/
>>>
>>> --
>>> Jennifer Hillman-Jackson
>>> Galaxy Support and Training
>>> http://galaxyproject.org
>>>
>>> ___________________________________________________________
>>> 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/

___________________________________________________________
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