Hi Oren,
I am posting the answer given to the galaxy-dev mailing list below for
other users, even thought this is a development topic. Next time, please
only post to a single mailing list.
Thanks!
Jen
Galaxy team
Repost:
On Nov 10, 2011, at 11:41 AM, Oren Livne wrote:
> Dear Nate,
>
> Thanks for your answer.
>
> 1. I could not find it in the admin panel in the UI. When I click on
"Manage users", I get the user list and can select users, but there is
no "Delete User" button.
Hi Oren,
Hrm, it looks like the option to delete users was removed from the
interface since it couldn't be made conditional on a configuration
setting (due to a limitation in Galaxy's "Grids" feature, which is used
to display the table of users in the UI). They can be added by
uncommented lines 98-100 in lib/galaxy/web/controllers/admin.py:
#operations.append( grids.GridOperation( "Delete", condition=(
lambda item: not item.deleted ), allow_multiple=True ) )
#operations.append( grids.GridOperation( "Undelete", condition=(
lambda item: item.deleted and not item.purged ), allow_multiple=True ) )
#operations.append( grids.GridOperation( "Purge", condition=(
lambda item: item.deleted and not item.purged ), allow_multiple=True ) )
> 2. Which call in the code deletes a user? I can then write my own API
method.
mark_user_deleted() in lib/galaxy/web/base/controller.py. The preferred
method for implementing API methods is by moving the code in the web UI
controller which performs the actual action to lib/galaxy/actions/ and
then changing the API and UI methods to call that method. See the
implementation of the Quota API for a reference.
> 3. If I try to reset passwords for more than one user at a time, I
get the error trackback:
>
> TypeError: Odd-length string URL:
http://128.135.107.157:8080/admin/reset_user_password
> Module weberror.evalexception.middleware:364 in respond
<plus.jpg> view
>>> app_iter = self.application(environ, detect_start_response)
> Module paste.debug.prints:98 in __call__ <plus.jpg> view
>>> environ, self.app)
> Module paste.wsgilib:539 in intercept_output <plus.jpg> view
>>> app_iter = application(environ, replacement_start_response)
> Module paste.recursive:80 in __call__ <plus.jpg> view
>>> return self.application(environ, start_response)
> Module paste.httpexceptions:632 in __call__ <plus.jpg> view
>>> return self.application(environ, start_response)
> Module galaxy.web.framework.base:160 in __call__ <plus.jpg> view
>>> body = method( trans, **kwargs )
> Module galaxy.web.framework:173 in decorator <plus.jpg> view
>>> return func( self, trans, *args, **kwargs )
> Module galaxy.web.base.controller:2025 in reset_user_password
<plus.jpg> view
>>> user = get_user( trans, user_id )
> Module galaxy.web.base.controller:2413 in get_user <plus.jpg>
view
>>> id = trans.security.decode_id( id )
> Module galaxy.web.security:45 in decode_id <plus.jpg> view
>>> return int( self.id_cipher.decrypt( obj_id.decode( 'hex' )
).lstrip( "!" ) )
> Module encodings.hex_codec:42 in hex_decode <plus.jpg> view
>>> output = binascii.a2b_hex(input)
> TypeError: Odd-length string
>
> 4. A similar problem occurs when I try to delete multiple data
libraries under "Manage data libraries". One library deletion works, but
multiple yields an error message:
>
> Invalid Library id (
df7a1f0c02a5b08e,0a248a1f62a0cc04,03501d7626bd192f,3f5830403180d620,2a56795cad3c7db3,417e33144b294c21,5a1cff6882ddb5b2,2d9035b3fc152403,4b187121143038ff,c9468fdb6dc5c5f1,1e8ab44153008be8,e85a3be143d5905b
) specifield.
Thanks for reporting these, we'll fix them as soon as possible. I've
created a bitbucket here to track them:
https://bitbucket.org/galaxy/galaxy-central/issue/678/some-user-and-library-grid-operations
--nate
On 11/9/11 3:14 PM, Oren Livne wrote:
Dear All,
Is it possible to delete a galaxy user or multiple users with a UI call
or an API call?
Thanks,
Oren
___________________________________________________________
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 Jackson
http://usegalaxy.org
http://galaxyproject.org/wiki/Support
___________________________________________________________
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/