[Archivesspace_api_doc_adhoc] Some updates for /users/ endpoints

Mayo, Dave dave_mayo at harvard.edu
Fri Oct 23 17:25:09 EDT 2020


Hi David!

I’ll take a look at this over this weekend, and try to answer most of these questions as well.

I think I know the answer to #4 - I think is there to support the “admin can log in as a user to do things/check what the user can view” use case.

--
Dave Mayo (he/him)
Senior Digital Library Software Engineer
Harvard University > HUIT > LTS

From: <archivesspace_api_doc_adhoc-bounces at lyralists.lyrasis.org> on behalf of "David W. Hodges" <dwh2128 at columbia.edu>
Reply-To: "archivesspace_api_doc_adhoc at lyralists.lyrasis.org" <archivesspace_api_doc_adhoc at lyralists.lyrasis.org>
Date: Tuesday, October 20, 2020 at 2:46 PM
To: "archivesspace_api_doc_adhoc at lyralists.lyrasis.org" <archivesspace_api_doc_adhoc at lyralists.lyrasis.org>
Subject: [Archivesspace_api_doc_adhoc] Some updates for /users/ endpoints

Hi all. I made my way through the routes related to user management (users.rb), starting at row 257 of the spreadsheet. I staged my changes in a branch here:

https://github.com/dwhodges2/archivesspace/blob/dh-docs-fixes/backend/app/controllers/users.rb<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dwhodges2_archivesspace_blob_dh-2Ddocs-2Dfixes_backend_app_controllers_users.rb&d=DwMFaQ&c=WO-RGvefibhHBZq3fL85hQ&r=_Mv1dY22K7jvT5MD7xjbvGVzRDOUMhx4WYcnPSIzYnE&m=6FX9zSFFEdHl9ewJ6OZz0-_2m3z5PvUDZkR3mkrC3QI&s=uGW21H6fvo9GOaT4u7ezOKP_c1iQW7Md9_TGN2Bh5Bw&e=>

I tested the existing shell scripts and added ASnake examples where I could (see below). I have a few questions/observations:

  1.  I am not sure I understand the distinction between "system" vs. "local" users. One route says "create a local user" and another says "get a list of system users" but they are hitting the same list as far as I can tell. Is this a meaningful distinction, or can we just simplify both to "users"?
  2.  "Update a user’s groups": I'm not able to confirm this route works. We have users assigned to groups in AS but when I pull any user's info it has groups = []. So I wasn't able to construct or test any examples. Is something deprecated here, or can someone point me to relevant info?
  3.  Should the "log in" route just refer users to the authentication section? Seems redundant and less informative here.
  4.  I was unable to work with "become a different user" in either shell or Python. I'm wondering what use case there would be for this, as opposed to just authenticating as a different user. In any case, I left it as it is for now but I think the default shell example needs to be tweaked as I couldn't get it to work.
  5.  I was not able to figure out Python examples for these:
• "Get a user’s details including their groups for the current repository"
• "Create a local user"
Someone more adept at ASnake could maybe weigh in (I don't use it in production at the moment).

Dave, should I create a PR for the branch above? Or let me know what the next step should be. Any feedback would be much appreciated. I replicated these notes in the spreadsheet FYI.

Thanks,
David


--
David W. Hodges
Special Collections Analyst
Columbia University Libraries
Butler Library
535 West 114th St.
New York, NY 10027
212 854-8758

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_api_doc_adhoc/attachments/20201023/f973b821/attachment.html>


More information about the Archivesspace_api_doc_adhoc mailing list