Temporarily disable other users (as admin user)

Hi.

Is there any way for the admin user to temporarily disable other users? We sometimes have situations where we need to temporarily suspend some accounts from processing.

Hi,

Maybe you can try using the delete_project_user_access function through cryosparc cli. The user should not be able to view the project through the web interface after that.

The complementary function is add_project_user_access:

cryosparcm cli "delete_project_user_access( 'P13', '4b31c100039a220f243f2687', 'b331c100039a22012344321')"
cryosparcm cli "add_project_user_access( 'P13', '4b31c100039a220f243f2687', 'b331c100039a22012344321' )"

Note that you need to know both the admin’s and the user’s _id for this operation:

cryosparcm cli "GetUser( 'joe@example.com' )['_id']"

To do the two things in one line:


cryosparcm cli "delete_project_user_access( 'P13', GetUser( 'admin@example.com' )['_id'], GetUser( 'user@example.com' )['_id'] )"