cancancan 1.16.0 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +6 -0
- data/CHANGELOG.rdoc +4 -0
- data/README.md +2 -2
- data/cancancan.gemspec +1 -0
- data/gemfiles/activerecord_3.2.gemfile +1 -0
- data/gemfiles/activerecord_4.0.gemfile +1 -0
- data/gemfiles/activerecord_4.1.gemfile +1 -0
- data/gemfiles/activerecord_4.2.gemfile +1 -0
- data/gemfiles/activerecord_5.0.gemfile +1 -0
- data/gemfiles/mongoid_2.x.gemfile +1 -0
- data/gemfiles/sequel_3.x.gemfile +1 -0
- data/lib/cancan/model_adapters/mongoid_adapter.rb +1 -1
- data/lib/cancan/version.rb +1 -1
- metadata +20 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 418d49100740136f143204714c01555ca5787a1e
|
4
|
+
data.tar.gz: 2631fb854865b69ab8720023eb2e50289f680603
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ac85e5511555021a0841efbdb82eb0eccf5d3145d8e53de3df189484f5a7eb34796224912556c553ead44d75aa0d496838fe73c8db25a10ede4d889c0ab115f
|
7
|
+
data.tar.gz: 34dc9609930ec647cf36f7ce5fe3caa8663720ba4f8d871df3333ad41e42177aac79f383a932f6189ea05c02b2060f6a44724cd1cd27c5ecd574886742d6b303
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
data/CHANGELOG.rdoc
CHANGED
data/README.md
CHANGED
@@ -19,7 +19,7 @@ All permissions are defined in a single location (the `Ability` class) and not d
|
|
19
19
|
|
20
20
|
Add this to your Gemfile:
|
21
21
|
|
22
|
-
gem 'cancancan'
|
22
|
+
gem 'cancancan', '~> 1.10'
|
23
23
|
|
24
24
|
and run the `bundle install` command.
|
25
25
|
|
@@ -104,7 +104,7 @@ def update_params
|
|
104
104
|
end
|
105
105
|
```
|
106
106
|
|
107
|
-
For the `:create` action,
|
107
|
+
For the `:create` action, CanCanCan will try to initialize a new instance with sanitized input by seeing if your
|
108
108
|
controller will respond to the following methods (in order):
|
109
109
|
|
110
110
|
1. `create_params`
|
data/cancancan.gemspec
CHANGED
@@ -5,6 +5,7 @@ source "https://rubygems.org"
|
|
5
5
|
gem "activerecord", "~> 4.0.5", :require => "active_record"
|
6
6
|
gem "activesupport", "~> 4.0.5", :require => "active_support/all"
|
7
7
|
gem "actionpack", "~> 4.0.5", :require => "action_pack"
|
8
|
+
gem "rubocop", "0.48.0"
|
8
9
|
|
9
10
|
platforms :jruby do
|
10
11
|
gem "activerecord-jdbcsqlite3-adapter"
|
@@ -5,6 +5,7 @@ source "https://rubygems.org"
|
|
5
5
|
gem "activerecord", "~> 4.1.1", :require => "active_record"
|
6
6
|
gem "activesupport", "~> 4.1.1", :require => "active_support/all"
|
7
7
|
gem "actionpack", "~> 4.1.1", :require => "action_pack"
|
8
|
+
gem "rubocop", "0.48.0"
|
8
9
|
|
9
10
|
platforms :jruby do
|
10
11
|
gem "activerecord-jdbcsqlite3-adapter"
|
@@ -6,6 +6,7 @@ gem "activerecord", "~> 4.2.0", :require => "active_record"
|
|
6
6
|
gem "activesupport", "~> 4.2.0", :require => "active_support/all"
|
7
7
|
gem "actionpack", "~> 4.2.0", :require => "action_pack"
|
8
8
|
gem "nokogiri", "~> 1.6.8", :require => "nokogiri"
|
9
|
+
gem "rubocop", "0.48.0"
|
9
10
|
|
10
11
|
platforms :jruby do
|
11
12
|
gem "activerecord-jdbcsqlite3-adapter"
|
@@ -5,6 +5,7 @@ source "https://rubygems.org"
|
|
5
5
|
gem "activerecord", "~> 5.0.0.rc1", :require => "active_record"
|
6
6
|
gem "activesupport", "~> 5.0.0.rc1", :require => "active_support/all"
|
7
7
|
gem "actionpack", "~> 5.0.0.rc1", :require => "action_pack"
|
8
|
+
gem "rubocop", "0.48.0"
|
8
9
|
|
9
10
|
platforms :jruby do
|
10
11
|
gem "activerecord-jdbcsqlite3-adapter"
|
@@ -5,6 +5,7 @@ source "https://rubygems.org"
|
|
5
5
|
gem "activesupport", "~> 3.0", :require => "active_support/all"
|
6
6
|
gem "actionpack", "~> 3.0", :require => "action_pack"
|
7
7
|
gem "mongoid", "~> 2.0.0"
|
8
|
+
gem "rubocop", "0.48.0"
|
8
9
|
|
9
10
|
platforms :ruby, :mswin, :mingw do
|
10
11
|
gem "bson_ext", "~> 1.1"
|
data/gemfiles/sequel_3.x.gemfile
CHANGED
@@ -62,7 +62,7 @@ module CanCan
|
|
62
62
|
if (relation = model_relations[k])
|
63
63
|
relation_class_name = relation[:class_name].blank? ? k.to_s.classify : relation[:class_name]
|
64
64
|
v = simplify_relations(relation_class_name.constantize, v)
|
65
|
-
relation_ids = relation_class_name.constantize.where(v).
|
65
|
+
relation_ids = relation_class_name.constantize.where(v).distinct(:_id)
|
66
66
|
k = "#{k}_id"
|
67
67
|
v = { '$in' => relation_ids }
|
68
68
|
end
|
data/lib/cancan/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cancancan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alessandro Rodi (Renuo AG)
|
@@ -11,76 +11,76 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-
|
14
|
+
date: 2017-05-18 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
|
-
- - ~>
|
20
|
+
- - "~>"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '1.3'
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - ~>
|
27
|
+
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '1.3'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: rubocop
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
|
-
- - ~>
|
34
|
+
- - "~>"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: '0.46'
|
37
37
|
type: :development
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- - ~>
|
41
|
+
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '0.46'
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: rake
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- - ~>
|
48
|
+
- - "~>"
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: 10.1.1
|
51
51
|
type: :development
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- - ~>
|
55
|
+
- - "~>"
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: 10.1.1
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rspec
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
|
-
- - ~>
|
62
|
+
- - "~>"
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: 3.2.0
|
65
65
|
type: :development
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- - ~>
|
69
|
+
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: 3.2.0
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
73
|
name: appraisal
|
74
74
|
requirement: !ruby/object:Gem::Requirement
|
75
75
|
requirements:
|
76
|
-
- -
|
76
|
+
- - ">="
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: 2.0.0
|
79
79
|
type: :development
|
80
80
|
prerelease: false
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: 2.0.0
|
86
86
|
description: Simple authorization solution for Rails. All permissions are stored in
|
@@ -90,11 +90,11 @@ executables: []
|
|
90
90
|
extensions: []
|
91
91
|
extra_rdoc_files: []
|
92
92
|
files:
|
93
|
-
- .gitignore
|
94
|
-
- .rspec
|
95
|
-
- .rubocop.yml
|
96
|
-
- .rubocop_todo.yml
|
97
|
-
- .travis.yml
|
93
|
+
- ".gitignore"
|
94
|
+
- ".rspec"
|
95
|
+
- ".rubocop.yml"
|
96
|
+
- ".rubocop_todo.yml"
|
97
|
+
- ".travis.yml"
|
98
98
|
- Appraisals
|
99
99
|
- CHANGELOG.rdoc
|
100
100
|
- CONTRIBUTING.md
|
@@ -159,17 +159,17 @@ require_paths:
|
|
159
159
|
- lib
|
160
160
|
required_ruby_version: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
|
-
- -
|
162
|
+
- - ">="
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: 2.0.0
|
165
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
166
|
requirements:
|
167
|
-
- -
|
167
|
+
- - ">="
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
171
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.
|
172
|
+
rubygems_version: 2.5.2
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: Simple authorization solution for Rails.
|