Deleting other users' studies as server admin

35 views
Skip to first unread message

beckyann...@gmail.com

unread,
Jan 20, 2021, 6:22:41 PM1/20/21
to JATOS
Hi JATOS users!

Is there a straightforward way for a server admin to delete JATOS studies in which they are not a 'user' for that study? For instance, in cases where a researcher has left the institution and their old studies need to be cleared off the server?

Logging into the JATOS web interface as admin doesn't allow access to all of the studies on the server, which I think is a good thing for security reasons. I suppose one option is to delete the study folder from study_assets_root, which works to clear up disk space but doesn't remove the study from the database. Perhaps a better option is to add our own account to the StudyUserMap table for any relevant studies, so that we can then delete them via the JATOS web interface?

Does anyone have other suggestions for a straightforward way of doing this, either via the web interface or from the command line?

Thanks!
Becky


Kristian Lange

unread,
Jan 21, 2021, 4:31:43 PM1/21/21
to JATOS
Hi Becky,

Actually, if you delete a user all studies of this user will be deleted too. And as an admin you can delete users from JATOS. So deleting the user of the person who left your institute should solve your problem and delete all this person's data on your JATOS including the studies, their result data and their result files. But this works only if this user is the only user of the study - if there is at least one other user in the study, the study and its data won't be deleted. But this is likely what you want: not deleting studies where other users might still work on.

Best,
Kristian

Kristian Lange

unread,
Jan 21, 2021, 4:35:01 PM1/21/21
to JATOS
Was just thinking maybe we should mention this somewhere in the docs too :) 

beckyann...@gmail.com

unread,
Jan 22, 2021, 12:46:13 PM1/22/21
to JATOS
Thanks Kristian - that makes sense and is very helpful!

Out of curiosity, is there an easy way to delete specific JATOS studies from the command line, without deleting the user?

Cheers,
Becky

Kristian Lange

unread,
Jan 22, 2021, 3:22:32 PM1/22/21
to JATOS
It's complex to completely erase any reference to a study. You would have to delete rows in several tables in the database, tables for studies,  components, batches, study results, component results, and group results. And addition one always has to delete the study assets folder. But if you just want to free up most of the disk space a study is using you can clean up the database by deleting all results and the study assets folder. But altering the database directly via the terminal is quite dangerous, especially on a production system. If you think deleting a study by an admin is necessary I'd rather think about implementing it in JATOS.
Best,
Kristian

beckyann...@gmail.com

unread,
Jan 25, 2021, 7:46:52 PM1/25/21
to JATOS
Hi Kristian,
Ok that's what I figured, but just wanted to check in case there was some magical JATOS CLI function that could do this. I'll just stick to deleting studies through the JATOS GUI :)
Thanks!
Becky
Reply all
Reply to author
Forward
0 new messages