atlas_rb 1.6.5 → 1.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.version +1 -1
- data/Gemfile.lock +1 -1
- data/lib/atlas_rb/person.rb +17 -5
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 73faf0ef6535c48fc4e56f6aead845d9110cd9cc41966a8fc336d397840040b0
|
|
4
|
+
data.tar.gz: 36ad840afae41129b06fafd5b4957502d9264800dc27b3998e36dfaa6d3c1a4a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 830fc91838b5aaa0a6faa92f040657caa59aa5da3b304c251faf5966cea78807b045af0299220378a0a5c8214c88e8aad335c0aa98f9ff0ec8148204d36bb6a9
|
|
7
|
+
data.tar.gz: be1b28b4473fe3761c9d99f00e7138b9bb7ef7445bf62b58d990d94b9b34627434e5a72b4d9cfe9bb4666f0a5c1ec0a95a4a9f6d795aea97078b7b2bf8aa3ede
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.6.
|
|
1
|
+
1.6.6
|
data/Gemfile.lock
CHANGED
data/lib/atlas_rb/person.rb
CHANGED
|
@@ -5,7 +5,14 @@ module AtlasRb
|
|
|
5
5
|
# directory. A Person correlates the several `users` rows that share a NUID
|
|
6
6
|
# and carries the authoritative, librarian-editable `display_name` (the SSO
|
|
7
7
|
# `users.name` is frequently wrong and is clobbered on every login), plus
|
|
8
|
-
# community affiliations
|
|
8
|
+
# community affiliations and a stable **personal-root Collection**.
|
|
9
|
+
#
|
|
10
|
+
# The returned Mash carries `personal_root_id` — the **NOID** of that personal
|
|
11
|
+
# root, the structural parent the weighted-deposit publish conduit writes the
|
|
12
|
+
# person's own Works under (then linked into a community showcase via
|
|
13
|
+
# {Work.add_linked_member}). Atlas mints it eagerly at create, so it is always
|
|
14
|
+
# present on a Person; read it straight off the resolve/find Mash, e.g.
|
|
15
|
+
# `AtlasRb::Work.create(person["personal_root_id"], depositor: person["nuid"])`.
|
|
9
16
|
#
|
|
10
17
|
# Addressed by **NOID** (like Work/Collection) — the staff-facing NUID is kept
|
|
11
18
|
# server-side and never put in a public URL. So the positional `id` argument
|
|
@@ -27,7 +34,8 @@ module AtlasRb
|
|
|
27
34
|
# @param nuid [String, nil] acting principal (signed into the assertion sub).
|
|
28
35
|
# @param on_behalf_of [String, nil] acting-as target.
|
|
29
36
|
# @return [AtlasRb::Mash] the unwrapped `"person"` object (carries the
|
|
30
|
-
# server-side `nuid` for callers that need it, e.g. depositor gating
|
|
37
|
+
# server-side `nuid` for callers that need it, e.g. depositor gating, and
|
|
38
|
+
# `personal_root_id` for the publish-conduit parent).
|
|
31
39
|
def self.find(id, nuid: nil, on_behalf_of: nil)
|
|
32
40
|
AtlasRb::Mash.new(JSON.parse(
|
|
33
41
|
connection({}, nuid, on_behalf_of: on_behalf_of).get(ROUTE + id)&.body
|
|
@@ -35,8 +43,9 @@ module AtlasRb
|
|
|
35
43
|
end
|
|
36
44
|
|
|
37
45
|
# List people — the NOID-keyed People-index source. Returns the page's
|
|
38
|
-
# Persons (each with `noid`, `display_name`,
|
|
39
|
-
# a consumer builds the index and profiles entirely
|
|
46
|
+
# Persons (each with `noid`, `display_name`, the server-side `nuid`, and
|
|
47
|
+
# `personal_root_id`), so a consumer builds the index and profiles entirely
|
|
48
|
+
# through atlas_rb without
|
|
40
49
|
# routing People through the catalog/Solr or exposing a NUID publicly.
|
|
41
50
|
#
|
|
42
51
|
# @param page [Integer, nil] 1-based page (server default when nil).
|
|
@@ -54,11 +63,14 @@ module AtlasRb
|
|
|
54
63
|
|
|
55
64
|
# Batch-resolve people to their authoritative display_name in one call
|
|
56
65
|
# (supersedes the SSO users directory's resolve). Unresolved NUIDs drop.
|
|
66
|
+
# The deposit fork reads `affiliated_community_ids` and `personal_root_id`
|
|
67
|
+
# off the same resolve Mash it already makes for the depositor's Person.
|
|
57
68
|
#
|
|
58
69
|
# @param nuids [Array<String>] the NUIDs to resolve.
|
|
59
70
|
# @param nuid [String, nil] acting principal.
|
|
60
71
|
# @param on_behalf_of [String, nil] acting-as target.
|
|
61
|
-
# @return [Array<AtlasRb::Mash>] one unwrapped `"person"` per resolved NUID
|
|
72
|
+
# @return [Array<AtlasRb::Mash>] one unwrapped `"person"` per resolved NUID
|
|
73
|
+
# (each carries `nuid`, `affiliated_community_ids`, and `personal_root_id`).
|
|
62
74
|
def self.resolve(nuids, nuid: nil, on_behalf_of: nil)
|
|
63
75
|
JSON.parse(
|
|
64
76
|
connection({ nuids: Array(nuids).join(",") }, nuid, on_behalf_of: on_behalf_of).get(ROUTE)&.body
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: atlas_rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Cliff
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|