bullet_train-super_load_and_authorize_resource 1.2.10 → 1.2.11
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: '009a6c9c68e70790436b5f8ee20644992cfbe3c3d23b9fe65d46f4bcd78d2635'
|
4
|
+
data.tar.gz: 80dc57606c409a284d6042aec16b6926661cadd298c5f72a1e7d31d6ad6da80c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4da6e397a39c2c29fffa212b0706ff5c48f0b932a942bdcdad45f6c2fa2d68ad723df51b0671e08a896001e1c8301eac751c5223a7a77c3483e517f07b79558e
|
7
|
+
data.tar.gz: 6b1b04b69d3791b55e277f53ebd4c9215e1be4b334e0ad9314ceb79fef66bbcde914c27a74c7bdde1c6cdfa056972c2086dd6321200a5130e61111ea4af4b04e
|
@@ -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.11
|
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-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|