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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: decab10cfb0c67c68615a9695a8c5084aa1bd349e199dccd77a76d024a3e7ba3
4
- data.tar.gz: 90c4db9a3ffd80e9f226334f4862b9982534e431a3a6eb58746bfa96442ee701
3
+ metadata.gz: f0b6def06432136a4f0fda238a5c8ff3599de63234325e8609d0fcc49012d42d
4
+ data.tar.gz: a50c8fbbcaa1776a171f199e86e5ab90a8034f8c9415547c97893f52dc26a449
5
5
  SHA512:
6
- metadata.gz: 7fc789c2d47882f6d93664de27f7ab2f2a0d7d43957f4244436600e4247a332c5f8b3df030a5b11fb064187bd55439c0417a04974ca321df88861d47e0da2f15
7
- data.tar.gz: 7189e8bcc3b4d483f623cfdc7a0881f41735646ef085f05a1418436b927fc84c2be514844ea44572c0d2c85f48e057be3a86d5774ac55bf8e09ae3ac4238fc4a
6
+ metadata.gz: 19578a460cb38f49fd97a7513cc2ba6d782fa260a82f3c1071cc88e01a6a21ad6026969422033af5ad013f3e81d2d4d400fab42c72b300bd410582dc806d7f29
7
+ data.tar.gz: 941ce0caf062890a63891e5a458d83e1300e9240240f8adaf39a9e7ed7879ddaf4ef8168c566b052c5c7f7fde50c66e00e93baa66f71462a5464f2ea1b4a03ad
data/.version CHANGED
@@ -1 +1 @@
1
- 1.6.0
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.0)
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.2)
16
+ faraday (2.14.3)
17
17
  faraday-net_http (>= 2.0, < 3.5)
18
18
  json
19
19
  logger
@@ -53,16 +53,31 @@ module AtlasRb
53
53
  ))["compilation"]
54
54
  end
55
55
 
56
- # List Compilations, owner-scoped and paginated (newest first).
57
- #
58
- # Defaults to the acting user's own Sets. Pass `owner:` to list another
59
- # user's — that is admin-only and raises {AtlasRb::ForbiddenError} for
60
- # anyone else. There is no public browse surface. Pass `q:` to narrow
61
- # by case-insensitive title substring; the filter applies before
62
- # pagination, so the `"pagination"` block describes the filtered result.
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atlas_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cliff