standard_id 0.14.2 → 0.14.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/lib/standard_id/authorization_bypass.rb +8 -0
- data/lib/standard_id/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: 3ef63474df3107460650e529f2c8cf46ec3b0998f81db90ece5cf37d95ec14fc
|
|
4
|
+
data.tar.gz: 3c0e147ce91c2442d05157507d088aa8f1a6fcb52b7e38c4e15b2d5cb6da9fde
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0571fe2ae8b0e429f8c9ab8d3f7f73e475e1395297d392460fce1d7db0d75b880baeebbd7e34befbba7e58fc37684255902ea1358b5bbed2be6b6e2a29489c36
|
|
7
|
+
data.tar.gz: 791d1b6618bd054da2e57b2ee7f626eb60af647070b1d075ceb1f274e92ec4b3912b601ec076af3ad81357f957c1dfa460810d448a628c93c1791b299b127be2
|
|
@@ -103,6 +103,14 @@ module StandardId
|
|
|
103
103
|
# Must remain public because it is invoked from a to_prepare lambda
|
|
104
104
|
# registered in apply, which executes outside this module's scope.
|
|
105
105
|
def apply_skips!
|
|
106
|
+
# ControllerPolicy lives in app/controllers/concerns/ and is autoloaded
|
|
107
|
+
# by Zeitwerk. When apply is called early (e.g. from a Rails initializer),
|
|
108
|
+
# the constant may not be loaded yet. This is safe to skip — controllers
|
|
109
|
+
# that register later will receive skips via apply_to_controller (called
|
|
110
|
+
# from ControllerPolicy.register), and the to_prepare block re-runs
|
|
111
|
+
# apply_skips! after class loading is complete.
|
|
112
|
+
return unless defined?(StandardId::ControllerPolicy)
|
|
113
|
+
|
|
106
114
|
StandardId::ControllerPolicy.registry_snapshot.each do |policy, controllers|
|
|
107
115
|
controllers.each { |controller| apply_to_controller(controller, policy) }
|
|
108
116
|
end
|
data/lib/standard_id/version.rb
CHANGED