[Archivesspace_api_doc_adhoc] Some updates for /users/ endpoints

Mayo, Dave dave_mayo at harvard.edu
Mon Oct 26 14:17:42 EDT 2020


Sorry for the delay!

Looked into this some:

1. So, it looks like these are two separate distinctions:  system means “including hidden users,” which are:

+----------------------------+
| name                       |
+----------------------------+
| Search Indexer             |
| Public Interface Anonymous |
| Staff System User          |
| Request System User        |
+----------------------------+

Local… doesn’t as far as I can tell mean anything?  It might in context of some plugins, i.e. if someone has a plugin that adds an SSO sign in option, there’d be a distinction, but IMO it looks like it’s not signifying anything in the software as delivered.

2. Hmmm. So, re: users showing up with empty groups, I have run into this before – IIRC, it might be an issue with permissions – you need to have admin perms to see other users groups, I think?  If it’s not that, then we’ll need to dig in.

3. It definitely ought to have a link, and possibly duplicate some info as well.  Honestly, I think cross-linking them would be ideal.

5. I can maybe take a look at writing examples for this tonight.
--
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/20201026/6524ce52/attachment-0001.html>


More information about the Archivesspace_api_doc_adhoc mailing list