cancancan_nested_auth 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cancancan/configuration.rb +6 -1
- data/lib/cancancan/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: 3dc3968e597bcafec1512406e02e86a03bc3c76812c8680280cb2eda8b36e2a4
|
4
|
+
data.tar.gz: f07be991d4caedc6c7a9fd83de61d811810751a2019a468f01b9ed34b93cd831
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a19784886f5e180f91e4026ce959304e24179bc1fa05579ac1fb2e841e020c8bad770e11ba4982d29012795b19f5738fd5755910787f098d1d676deb224124a8
|
7
|
+
data.tar.gz: a2c74ae68e057949956af981bacf6296c23c3e2d69e07d08c21e0b394b325a9aa704a0ac045c2e0b5685abc06dc64430ed465fa61f3824309b540f3a37e18d7c
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module CanCanCan
|
2
2
|
module NestedAssignmentAndAuthorization
|
3
3
|
class Configuration
|
4
|
-
attr_accessor :silence_raised_errors, :use_smart_nested_authorizations
|
4
|
+
attr_accessor :silence_raised_errors, :use_smart_nested_authorizations, :use_resource_key_in_params
|
5
5
|
|
6
6
|
def initialize
|
7
7
|
# Allows for stopping unauthorized actions without raising errors
|
@@ -9,6 +9,11 @@ module CanCanCan
|
|
9
9
|
# Auto-determine what action to auth on nested associations (:create, :update, :destroy)
|
10
10
|
# - will use the action of the root object otherwise.
|
11
11
|
@use_smart_nested_authorizations = true
|
12
|
+
# Set to `true` if you're nesting parameter data under the resource_key
|
13
|
+
# - i.e. params => {user: {email: 'test', name: 'fun'}}
|
14
|
+
# Set to `false` if resource parameter data is direct in in params.
|
15
|
+
# - i.e. params => {email: 'test', name: 'fun'}
|
16
|
+
@use_resource_key_in_params = false
|
12
17
|
end
|
13
18
|
end
|
14
19
|
end
|
data/lib/cancancan/version.rb
CHANGED