atlas_rb 1.6.0 → 1.6.1
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 +2 -2
- data/lib/atlas_rb/compilation.rb +31 -9
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f0b6def06432136a4f0fda238a5c8ff3599de63234325e8609d0fcc49012d42d
|
|
4
|
+
data.tar.gz: a50c8fbbcaa1776a171f199e86e5ab90a8034f8c9415547c97893f52dc26a449
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 19578a460cb38f49fd97a7513cc2ba6d782fa260a82f3c1071cc88e01a6a21ad6026969422033af5ad013f3e81d2d4d400fab42c72b300bd410582dc806d7f29
|
|
7
|
+
data.tar.gz: 941ce0caf062890a63891e5a458d83e1300e9240240f8adaf39a9e7ed7879ddaf4ef8168c566b052c5c7f7fde50c66e00e93baa66f71462a5464f2ea1b4a03ad
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.6.
|
|
1
|
+
1.6.1
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
atlas_rb (1.6.
|
|
4
|
+
atlas_rb (1.6.1)
|
|
5
5
|
faraday (~> 2.7)
|
|
6
6
|
faraday-follow_redirects (~> 0.3.0)
|
|
7
7
|
faraday-multipart (~> 1)
|
|
@@ -13,7 +13,7 @@ GEM
|
|
|
13
13
|
specs:
|
|
14
14
|
base64 (0.3.0)
|
|
15
15
|
diff-lcs (1.6.1)
|
|
16
|
-
faraday (2.14.
|
|
16
|
+
faraday (2.14.3)
|
|
17
17
|
faraday-net_http (>= 2.0, < 3.5)
|
|
18
18
|
json
|
|
19
19
|
logger
|
data/lib/atlas_rb/compilation.rb
CHANGED
|
@@ -53,16 +53,31 @@ module AtlasRb
|
|
|
53
53
|
))["compilation"]
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
-
# List Compilations,
|
|
57
|
-
#
|
|
58
|
-
#
|
|
59
|
-
# user's —
|
|
60
|
-
# anyone else
|
|
61
|
-
#
|
|
62
|
-
#
|
|
56
|
+
# List Compilations, paginated (newest first), in one of three modes.
|
|
57
|
+
#
|
|
58
|
+
# Default (no `scope:`) is owner-scoped: the acting user's own Sets. Pass
|
|
59
|
+
# `owner:` to list another user's — admin-only, raising
|
|
60
|
+
# {AtlasRb::ForbiddenError} for anyone else; there is no public browse
|
|
61
|
+
# surface.
|
|
62
|
+
#
|
|
63
|
+
# Pass `scope:` for grant-scoped discovery — Sets where the acting user is
|
|
64
|
+
# a *grantee* but **not** the owner (owned Sets are always excluded; list
|
|
65
|
+
# those with the default mode):
|
|
66
|
+
# - `scope: :editable` — Sets the caller may edit (`edit_users` /
|
|
67
|
+
# `edit_groups` grants).
|
|
68
|
+
# - `scope: :shared` — Sets shared with the caller (`read_groups` grants,
|
|
69
|
+
# plus the edit grants that imply read).
|
|
70
|
+
# Grant-scoped modes are keyed on the acting user; `owner:` is ignored and
|
|
71
|
+
# group membership is resolved server-side. An unknown `scope:` is a 400.
|
|
72
|
+
#
|
|
73
|
+
# Pass `q:` to narrow by case-insensitive title substring in any mode; the
|
|
74
|
+
# filter applies before pagination, so the `"pagination"` block describes
|
|
75
|
+
# the filtered result.
|
|
63
76
|
#
|
|
64
77
|
# @param owner [String, nil] NUID whose Sets to list (admin-only when it
|
|
65
|
-
# isn't the acting user). Omit for "my Sets".
|
|
78
|
+
# isn't the acting user). Omit for "my Sets". Ignored when `scope:` is set.
|
|
79
|
+
# @param scope [Symbol, String, nil] grant-scoped mode — `:editable` or
|
|
80
|
+
# `:shared`. Omit for the owner-scoped default.
|
|
66
81
|
# @param q [String, nil] case-insensitive title substring filter.
|
|
67
82
|
# @param page [Integer, nil] 1-indexed page number.
|
|
68
83
|
# @param per_page [Integer, nil] page size override.
|
|
@@ -82,11 +97,18 @@ module AtlasRb
|
|
|
82
97
|
# @example Another user's Sets (admin)
|
|
83
98
|
# AtlasRb::Compilation.list(owner: "000000002", nuid: "000000004")
|
|
84
99
|
#
|
|
100
|
+
# @example Sets shared with me that I can edit (not owned)
|
|
101
|
+
# AtlasRb::Compilation.list(scope: :editable, nuid: "000000002")
|
|
102
|
+
#
|
|
103
|
+
# @example Sets shared with me to view (read + edit grants, not owned)
|
|
104
|
+
# AtlasRb::Compilation.list(scope: :shared, nuid: "000000002")
|
|
105
|
+
#
|
|
85
106
|
# @example Title typeahead
|
|
86
107
|
# AtlasRb::Compilation.list(q: "course", nuid: "000000002")
|
|
87
|
-
def self.list(owner: nil, q: nil, page: nil, per_page: nil, nuid: nil, on_behalf_of: nil)
|
|
108
|
+
def self.list(owner: nil, scope: nil, q: nil, page: nil, per_page: nil, nuid: nil, on_behalf_of: nil)
|
|
88
109
|
params = {}
|
|
89
110
|
params[:owner] = owner if owner
|
|
111
|
+
params[:scope] = scope if scope
|
|
90
112
|
params[:q] = q if q
|
|
91
113
|
params[:page] = page if page
|
|
92
114
|
params[:per_page] = per_page if per_page
|