standard_audit 0.13.2 → 0.13.3
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/CHANGELOG.md +12 -0
- data/README.md +1 -1
- data/lib/standard_audit/configuration.rb +9 -1
- data/lib/standard_audit/version.rb +1 -1
- 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: 77f38f95622eab13dc70d4376ad9694a3bbb03d3d54f5f2c43f63012e041ea23
|
|
4
|
+
data.tar.gz: 5d68228d9da02a23808db8cc2588dc358df1dc7f7a82d86da4447d98038f6411
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5ca114c4894594f1e0de803d0d0e207bd308f887e130237af3d967a4ed33bc476ac72f28b1cff8b83af5f2d5c56e158542a917c560680c96e3f686ec339c6ec
|
|
7
|
+
data.tar.gz: 991e7cbfd6c21c73f54bc1bc1ed64aa1df8faaa2a6d44dfdf75222ab79911eb462de275ca086d74ef72108db70bad6df1f8c9f65fab9ec7ea115c0bb5bb99f1e
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.13.3] - 2026-10-21
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- The default `scope_extractor` returns the payload's `scope:` only when it is a
|
|
15
|
+
record (responds to `to_global_id`). standard_id publishes `scope:` as a
|
|
16
|
+
Symbol or String (the OAuth scope or auth plane), and the old default passed it
|
|
17
|
+
to `to_global_id`, so those events failed to write (`NoMethodError`,
|
|
18
|
+
fundbright-web FUNDBRIGHT-WEB-41). A non-record scope now falls through to
|
|
19
|
+
`current_scope_resolver`, like an absent one. A custom `scope_extractor` and an
|
|
20
|
+
explicit `scope:` on `StandardAudit.record` are unchanged.
|
|
21
|
+
|
|
10
22
|
## [0.13.2] - 2026-10-02
|
|
11
23
|
|
|
12
24
|
### Fixed
|
data/README.md
CHANGED
|
@@ -508,7 +508,7 @@ StandardAudit.configure(baseline: true) do |config|
|
|
|
508
508
|
# Defaults shown below.
|
|
509
509
|
config.actor_extractor = ->(payload) { payload[:actor] }
|
|
510
510
|
config.target_extractor = ->(payload) { payload[:target] }
|
|
511
|
-
config.scope_extractor = ->(payload) { payload[:scope] }
|
|
511
|
+
config.scope_extractor = ->(payload) { payload[:scope] } # default keeps it only if it responds to to_global_id
|
|
512
512
|
|
|
513
513
|
# -- Current Attribute Resolvers --
|
|
514
514
|
# Fallbacks used when payload values are nil.
|
|
@@ -24,7 +24,15 @@ module StandardAudit
|
|
|
24
24
|
|
|
25
25
|
@actor_extractor = ->(payload) { payload[:actor] }
|
|
26
26
|
@target_extractor = ->(payload) { payload[:target] }
|
|
27
|
-
|
|
27
|
+
# Only a record can be a scope (it is stored by GlobalID). Payloads also
|
|
28
|
+
# use `scope:` for other things: standard_id publishes the OAuth scope
|
|
29
|
+
# or auth plane there as a Symbol/String, which would raise NoMethodError
|
|
30
|
+
# on `to_global_id` at write time. Anything else falls through to
|
|
31
|
+
# `current_scope_resolver`.
|
|
32
|
+
@scope_extractor = ->(payload) {
|
|
33
|
+
scope = payload[:scope]
|
|
34
|
+
scope if scope.respond_to?(:to_global_id)
|
|
35
|
+
}
|
|
28
36
|
|
|
29
37
|
# Tries StandardId's `Current.account` first, then the Rails-generator
|
|
30
38
|
# convention `Current.user`. Each is respond_to?-guarded, so an app that
|