galaxyproject / hack-the-galaxy-gcc2017

2 stars 2 forks source link

Dev/Doc issue: Galaxy Admins need a way to identify old/inactive users and manage them #23

Open XDtim opened 7 years ago

XDtim commented 7 years ago

Many Galaxy admins have endured the pains of managing old/inactive users. Many savvy admins have cooked up their own Python code to connect to SQLAlchemy and identify/delete/manage users.

It would be 'nice' of us to help admins out with a supported way to manage users.

Admin wish list: ---Use case 1: As an admin, I want to see a list of users that haven't logged in in X days. Also, users that are inactive/never verified their email, never logged in. I want ways to list these users (default/ dry-run), and also run delete/update/remote on them (dangerous, actually deletes data and users) ---Use case 2: As an admin, I want a way to see more detail about users that are using a lot of data (ie. is their space local, on my NFS storage mount, etc) ---Use case 3: As an admin, I want to see a list of users that have workflows that use Tool X, or Dataset Y

Deliverables:
1 - Add some code to Bioblend and Galaxy core for users management, address the use cases above 2 - Make this code available on the command line with Parsec (it's a tool that wraps up the Bioblend API on the command line for admins/backend scripts) 3- Document how to use these new functions on the command line with Parsec/whatever

XDtim commented 7 years ago

I would like to work on this issue

XDtim commented 7 years ago

I had started this task in gcc2016, I would like to continue it. Please let me know if what I have written above is the 'right' way to do this...

bgruening commented 7 years ago

@XDtim this also looks like a great enhancements for reports.

XDtim commented 7 years ago

Created pull request #4255

Added 4 more parms to the user index API. Tested locally. Don't think it broke anything

New parms are: active deleted purged password_last_changed

I don't think there are any security concerns with this change. The API is already locked down so users can only see their own info. You must have admin rights to get a list of all users

XDtim commented 7 years ago

If this request is merged, I will update the galaxy docs with some examples of how admins can use these new parms to better identify in-active users