sequel-privacy 0.2.1 → 0.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/sequel/plugins/privacy.rb +8 -0
- data/lib/sequel/privacy/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: fd27576a058e95f92fd4c50fc1f5da0e058d0b7f93c3f114b88757a08651dd29
|
|
4
|
+
data.tar.gz: f429f5fc246fcd7cb043170a8166b7bc06fa04125aa4c89d6fe196b4c5bead31
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c58b5116d0b2a0ac0acf829612cdf46ee3ec1ef08879d189bbf94170248ac8cbf6a540601de6794bf6f03086e5af4e2f555291ac5d2de22a5405f1fb61ab066a
|
|
7
|
+
data.tar.gz: bf580a74fcb95fc328f7d0564877804ef642783442254af86d436ae853b89d88f71cd5abb6cff95ba56ed38992261557049350081bad9d35d63a80ce7ebbde96
|
|
@@ -302,6 +302,8 @@ module Sequel
|
|
|
302
302
|
vc = instance_variable_get(:@viewer_context)
|
|
303
303
|
|
|
304
304
|
unless vc
|
|
305
|
+
return original_method.bind(self).() if T.unsafe(self.class).allow_unsafe_access?
|
|
306
|
+
|
|
305
307
|
Kernel.raise Sequel::Privacy::MissingViewerContext,
|
|
306
308
|
"#{self.class}##{field} requires a ViewerContext"
|
|
307
309
|
end
|
|
@@ -518,6 +520,8 @@ module Sequel
|
|
|
518
520
|
vc = instance_variable_get(:@viewer_context)
|
|
519
521
|
|
|
520
522
|
unless vc
|
|
523
|
+
return original.bind(self).(obj) if T.unsafe(self.class).allow_unsafe_access?
|
|
524
|
+
|
|
521
525
|
Kernel.raise Sequel::Privacy::MissingViewerContext,
|
|
522
526
|
"Cannot #{method_name} without a viewer context"
|
|
523
527
|
end
|
|
@@ -548,6 +552,8 @@ module Sequel
|
|
|
548
552
|
vc = instance_variable_get(:@viewer_context)
|
|
549
553
|
|
|
550
554
|
unless vc
|
|
555
|
+
return original.bind(self).(obj) if T.unsafe(self.class).allow_unsafe_access?
|
|
556
|
+
|
|
551
557
|
Kernel.raise Sequel::Privacy::MissingViewerContext,
|
|
552
558
|
"Cannot #{method_name} without a viewer context"
|
|
553
559
|
end
|
|
@@ -578,6 +584,8 @@ module Sequel
|
|
|
578
584
|
vc = instance_variable_get(:@viewer_context)
|
|
579
585
|
|
|
580
586
|
unless vc
|
|
587
|
+
return original.bind(self).() if T.unsafe(self.class).allow_unsafe_access?
|
|
588
|
+
|
|
581
589
|
Kernel.raise Sequel::Privacy::MissingViewerContext,
|
|
582
590
|
"Cannot #{method_name} without a viewer context"
|
|
583
591
|
end
|