bullet_train-super_load_and_authorize_resource 1.2.10 → 1.2.12
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f95fb12178132e2b2c64b5a52432d05f7403be57086e915bca1c3fe4fafc220
|
4
|
+
data.tar.gz: 5b9dd64e1a09d5a461254184a3198201349a05e4f6392832c4408524d886dd99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e985c7987e0c25b59c62fc24a42d16a8632afafa88dc405685ed177b5e2d51e71c44db937af05b398545cc9d7a42b3f5a0d0ee54a77e560c7d190b32ad301de
|
7
|
+
data.tar.gz: 480353d8d9491bdf84d8759b26ae99c8fe80f551638110393ecf42bafa359e8606eea3054fc270ace0d225389aca599aab540bff6e73d0d6ad0a5a3f8cc50660
|
@@ -7,8 +7,14 @@ module LoadsAndAuthorizesResource
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def load_team
|
10
|
-
#
|
11
|
-
|
10
|
+
# Not all objects that need to be authorized belong to a team,
|
11
|
+
# so we give @team a nil value if no association is found.
|
12
|
+
begin
|
13
|
+
# Sometimes `@team` has already been populated by earlier `before_action` steps.
|
14
|
+
@team ||= @child_object&.team || @parent_object&.team
|
15
|
+
rescue NoMethodError
|
16
|
+
@team = nil
|
17
|
+
end
|
12
18
|
|
13
19
|
# Update current attributes.
|
14
20
|
Current.team = @team
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-super_load_and_authorize_resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|