acl9 2.1.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +3 -0
- data/.ruby-version +1 -1
- data/.travis.yml +27 -11
- data/Appraisals +13 -6
- data/Gemfile +0 -2
- data/Gemfile.lock +125 -112
- data/README.md +11 -4
- data/Rakefile +0 -2
- data/acl9.gemspec +1 -3
- data/gemfiles/.bundle/config +2 -0
- data/gemfiles/rails_5.0.gemfile +10 -0
- data/gemfiles/rails_5.1.gemfile +10 -0
- data/gemfiles/{rails_4.0.gemfile → rails_5.2.gemfile} +2 -4
- data/gemfiles/{rails_4.1.gemfile → rails_6.0.gemfile} +2 -4
- data/gemfiles/{rails_4.2.gemfile → rails_6.1.gemfile} +2 -4
- data/lib/acl9.rb +40 -0
- data/lib/acl9/controller_extensions.rb +1 -1
- data/lib/acl9/controller_extensions/dsl_base.rb +8 -7
- data/lib/acl9/controller_extensions/generators.rb +4 -35
- data/lib/acl9/model_extensions.rb +3 -3
- data/lib/acl9/model_extensions/for_subject.rb +52 -31
- data/lib/acl9/version.rb +1 -1
- data/lib/generators/acl9/setup/setup_generator.rb +10 -3
- data/lib/generators/acl9/setup/templates/create_role_tables.rb +10 -1
- data/lib/generators/acl9/setup/templates/role.rb +1 -1
- data/test/controller_extensions/actions_test.rb +1 -1
- data/test/controller_extensions/multiple_role_arguments_test.rb +11 -10
- data/test/controllers/acl_action_override_test.rb +4 -4
- data/test/controllers/acl_helper_method_test.rb +6 -3
- data/test/controllers/acl_ivars_test.rb +2 -2
- data/test/controllers/acl_object_hash_test.rb +1 -1
- data/test/controllers/acl_query_mixin.rb +5 -2
- data/test/controllers/acl_subject_method_test.rb +1 -1
- data/test/controllers/arguments_checking_test.rb +4 -4
- data/test/dummy/app/assets/config/manifest.js +0 -0
- data/test/dummy/app/controllers/acl_action_override.rb +5 -5
- data/test/dummy/app/controllers/acl_boolean_method.rb +6 -6
- data/test/dummy/app/controllers/acl_ivars.rb +3 -3
- data/test/dummy/app/controllers/acl_query_method_named.rb +2 -0
- data/test/dummy/app/controllers/application_controller.rb +6 -0
- data/test/dummy/app/controllers/empty_controller.rb +1 -1
- data/test/dummy/app/models/string_object_role.rb +3 -0
- data/test/dummy/app/models/string_user.rb +3 -0
- data/test/dummy/app/models/uuid.rb +1 -1
- data/test/dummy/config/environments/test.rb +2 -2
- data/test/dummy/config/routes.rb +12 -1
- data/test/dummy/db/migrate/20141117132218_create_tables.rb +68 -18
- data/test/models/roles_test.rb +13 -1
- data/test/test_helper.rb +31 -28
- metadata +26 -29
- data/test/dummy/config/environments/production.rb +0 -78
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7c96a3e331bb553a202d5002bc13de3d6660fe417ff48c20174715dfdb09e96f
|
4
|
+
data.tar.gz: 105c1c70b580c5a7cd49105e04d6f6f4acba5c8182fedc9ea9995dcb83050e71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c79f61b3da512da237806b469f5f24051b9b845424be81d08b52188ab4597acb71aa4ecb5047d211701d8324d438c83996052a5bc243f333cf967bf1517bebc
|
7
|
+
data.tar.gz: 8a218af5d9e00f16c9d7e5162ad973c7386d1c4c4b8801c541bd767caccdfecfb9b85fa342dfcfa46c727e49ef17d1432c55761629994135c5ce7542b9fe8826
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.2
|
data/.travis.yml
CHANGED
@@ -1,21 +1,37 @@
|
|
1
1
|
cache: bundler
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
-
- 2.
|
5
|
-
- 2.
|
6
|
-
- 2.
|
4
|
+
- 2.5.8
|
5
|
+
- 2.6.6
|
6
|
+
- 2.7.2
|
7
|
+
- 3.0.0
|
7
8
|
- ruby-head
|
8
9
|
|
9
10
|
gemfile:
|
10
|
-
- gemfiles/
|
11
|
-
- gemfiles/
|
12
|
-
- gemfiles/
|
11
|
+
- gemfiles/rails_5.0.gemfile
|
12
|
+
- gemfiles/rails_5.1.gemfile
|
13
|
+
- gemfiles/rails_5.2.gemfile
|
14
|
+
- gemfiles/rails_6.0.gemfile
|
15
|
+
- gemfiles/rails_6.1.gemfile
|
13
16
|
|
14
|
-
|
17
|
+
jobs:
|
15
18
|
fast_finish: true
|
16
19
|
allow_failures:
|
17
20
|
- rvm: ruby-head
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
21
|
+
exclude:
|
22
|
+
- rvm: 2.5.8
|
23
|
+
gemfile: gemfiles/rails_6.0.gemfile
|
24
|
+
- rvm: 2.5.8
|
25
|
+
gemfile: gemfiles/rails_6.1.gemfile
|
26
|
+
- rvm: 2.7.2
|
27
|
+
gemfile: gemfiles/rails_5.0.gemfile
|
28
|
+
- rvm: 2.7.2
|
29
|
+
gemfile: gemfiles/rails_5.1.gemfile
|
30
|
+
- rvm: 2.7.2
|
31
|
+
gemfile: gemfiles/rails_5.2.gemfile
|
32
|
+
- rvm: 3.0.0
|
33
|
+
gemfile: gemfiles/rails_5.0.gemfile
|
34
|
+
- rvm: 3.0.0
|
35
|
+
gemfile: gemfiles/rails_5.1.gemfile
|
36
|
+
- rvm: 3.0.0
|
37
|
+
gemfile: gemfiles/rails_5.2.gemfile
|
data/Appraisals
CHANGED
@@ -1,12 +1,19 @@
|
|
1
|
-
appraise "rails-
|
2
|
-
gem
|
1
|
+
appraise "rails-5.0" do
|
2
|
+
gem 'rails', '~> 5.0.0'
|
3
3
|
end
|
4
4
|
|
5
|
-
appraise "rails-
|
6
|
-
gem
|
5
|
+
appraise "rails-5.1" do
|
6
|
+
gem 'rails', '~> 5.1.0'
|
7
7
|
end
|
8
8
|
|
9
|
-
appraise "rails-
|
10
|
-
gem 'rails', '~>
|
9
|
+
appraise "rails-5.2" do
|
10
|
+
gem 'rails', '~> 5.2.0'
|
11
11
|
end
|
12
12
|
|
13
|
+
appraise "rails-6.0" do
|
14
|
+
gem 'rails', '~> 6.0.0'
|
15
|
+
end
|
16
|
+
|
17
|
+
appraise "rails-6.1" do
|
18
|
+
gem 'rails', '~> 6.1.0'
|
19
|
+
end
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,129 +1,142 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
acl9 (
|
5
|
-
rails (
|
4
|
+
acl9 (3.1.0)
|
5
|
+
rails (> 5.0, < 7.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
-
|
11
|
-
actionpack (=
|
12
|
-
|
13
|
-
|
10
|
+
actioncable (6.0.0)
|
11
|
+
actionpack (= 6.0.0)
|
12
|
+
nio4r (~> 2.0)
|
13
|
+
websocket-driver (>= 0.6.1)
|
14
|
+
actionmailbox (6.0.0)
|
15
|
+
actionpack (= 6.0.0)
|
16
|
+
activejob (= 6.0.0)
|
17
|
+
activerecord (= 6.0.0)
|
18
|
+
activestorage (= 6.0.0)
|
19
|
+
activesupport (= 6.0.0)
|
20
|
+
mail (>= 2.7.1)
|
21
|
+
actionmailer (6.0.0)
|
22
|
+
actionpack (= 6.0.0)
|
23
|
+
actionview (= 6.0.0)
|
24
|
+
activejob (= 6.0.0)
|
14
25
|
mail (~> 2.5, >= 2.5.4)
|
15
|
-
rails-dom-testing (~>
|
16
|
-
actionpack (
|
17
|
-
actionview (=
|
18
|
-
activesupport (=
|
19
|
-
rack (~>
|
20
|
-
rack-test (
|
21
|
-
rails-dom-testing (~>
|
22
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
23
|
-
|
24
|
-
|
26
|
+
rails-dom-testing (~> 2.0)
|
27
|
+
actionpack (6.0.0)
|
28
|
+
actionview (= 6.0.0)
|
29
|
+
activesupport (= 6.0.0)
|
30
|
+
rack (~> 2.0)
|
31
|
+
rack-test (>= 0.6.3)
|
32
|
+
rails-dom-testing (~> 2.0)
|
33
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
34
|
+
actiontext (6.0.0)
|
35
|
+
actionpack (= 6.0.0)
|
36
|
+
activerecord (= 6.0.0)
|
37
|
+
activestorage (= 6.0.0)
|
38
|
+
activesupport (= 6.0.0)
|
39
|
+
nokogiri (>= 1.8.5)
|
40
|
+
actionview (6.0.0)
|
41
|
+
activesupport (= 6.0.0)
|
25
42
|
builder (~> 3.1)
|
26
|
-
|
27
|
-
rails-dom-testing (~>
|
28
|
-
rails-html-sanitizer (~> 1.
|
29
|
-
activejob (
|
30
|
-
activesupport (=
|
31
|
-
globalid (>= 0.3.
|
32
|
-
activemodel (
|
33
|
-
activesupport (=
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
43
|
+
erubi (~> 1.4)
|
44
|
+
rails-dom-testing (~> 2.0)
|
45
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
46
|
+
activejob (6.0.0)
|
47
|
+
activesupport (= 6.0.0)
|
48
|
+
globalid (>= 0.3.6)
|
49
|
+
activemodel (6.0.0)
|
50
|
+
activesupport (= 6.0.0)
|
51
|
+
activerecord (6.0.0)
|
52
|
+
activemodel (= 6.0.0)
|
53
|
+
activesupport (= 6.0.0)
|
54
|
+
activestorage (6.0.0)
|
55
|
+
actionpack (= 6.0.0)
|
56
|
+
activejob (= 6.0.0)
|
57
|
+
activerecord (= 6.0.0)
|
58
|
+
marcel (~> 0.3.1)
|
59
|
+
activesupport (6.0.0)
|
60
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
61
|
+
i18n (>= 0.7, < 2)
|
42
62
|
minitest (~> 5.1)
|
43
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
44
63
|
tzinfo (~> 1.1)
|
45
|
-
|
46
|
-
appraisal (
|
64
|
+
zeitwerk (~> 2.1, >= 2.1.8)
|
65
|
+
appraisal (2.2.0)
|
47
66
|
bundler
|
48
67
|
rake
|
49
68
|
thor (>= 0.14.0)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
i18n (0.7.0)
|
62
|
-
json (1.8.1)
|
63
|
-
loofah (2.0.2)
|
69
|
+
builder (3.2.3)
|
70
|
+
byebug (11.0.1)
|
71
|
+
concurrent-ruby (1.1.5)
|
72
|
+
crass (1.0.4)
|
73
|
+
erubi (1.8.0)
|
74
|
+
globalid (0.4.2)
|
75
|
+
activesupport (>= 4.2.0)
|
76
|
+
i18n (1.6.0)
|
77
|
+
concurrent-ruby (~> 1.0)
|
78
|
+
loofah (2.2.3)
|
79
|
+
crass (~> 1.0.2)
|
64
80
|
nokogiri (>= 1.5.9)
|
65
|
-
mail (2.
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
minitest (5.
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
actionmailer (=
|
84
|
-
actionpack (=
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
rails-dom-testing (
|
96
|
-
activesupport (>= 4.2.0
|
97
|
-
nokogiri (
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
81
|
+
mail (2.7.1)
|
82
|
+
mini_mime (>= 0.1.1)
|
83
|
+
marcel (0.3.3)
|
84
|
+
mimemagic (~> 0.3.2)
|
85
|
+
method_source (0.9.2)
|
86
|
+
mimemagic (0.3.3)
|
87
|
+
mini_mime (1.0.2)
|
88
|
+
mini_portile2 (2.4.0)
|
89
|
+
minitest (5.11.3)
|
90
|
+
nio4r (2.5.1)
|
91
|
+
nokogiri (1.10.4)
|
92
|
+
mini_portile2 (~> 2.4.0)
|
93
|
+
rack (2.0.7)
|
94
|
+
rack-test (1.1.0)
|
95
|
+
rack (>= 1.0, < 3)
|
96
|
+
rails (6.0.0)
|
97
|
+
actioncable (= 6.0.0)
|
98
|
+
actionmailbox (= 6.0.0)
|
99
|
+
actionmailer (= 6.0.0)
|
100
|
+
actionpack (= 6.0.0)
|
101
|
+
actiontext (= 6.0.0)
|
102
|
+
actionview (= 6.0.0)
|
103
|
+
activejob (= 6.0.0)
|
104
|
+
activemodel (= 6.0.0)
|
105
|
+
activerecord (= 6.0.0)
|
106
|
+
activestorage (= 6.0.0)
|
107
|
+
activesupport (= 6.0.0)
|
108
|
+
bundler (>= 1.3.0)
|
109
|
+
railties (= 6.0.0)
|
110
|
+
sprockets-rails (>= 2.0.0)
|
111
|
+
rails-dom-testing (2.0.3)
|
112
|
+
activesupport (>= 4.2.0)
|
113
|
+
nokogiri (>= 1.6)
|
114
|
+
rails-html-sanitizer (1.2.0)
|
115
|
+
loofah (~> 2.2, >= 2.2.2)
|
116
|
+
railties (6.0.0)
|
117
|
+
actionpack (= 6.0.0)
|
118
|
+
activesupport (= 6.0.0)
|
119
|
+
method_source
|
104
120
|
rake (>= 0.8.7)
|
105
|
-
thor (>= 0.
|
106
|
-
rake (
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
sqlite3 (1.3.10)
|
119
|
-
tapout (0.4.5)
|
120
|
-
ansi
|
121
|
-
json
|
122
|
-
thor (0.19.1)
|
123
|
-
thread_safe (0.3.5)
|
124
|
-
tzinfo (1.2.2)
|
121
|
+
thor (>= 0.20.3, < 2.0)
|
122
|
+
rake (12.3.3)
|
123
|
+
sprockets (3.7.2)
|
124
|
+
concurrent-ruby (~> 1.0)
|
125
|
+
rack (> 1, < 3)
|
126
|
+
sprockets-rails (3.2.1)
|
127
|
+
actionpack (>= 4.0)
|
128
|
+
activesupport (>= 4.0)
|
129
|
+
sprockets (>= 3.0.0)
|
130
|
+
sqlite3 (1.4.1)
|
131
|
+
thor (0.20.3)
|
132
|
+
thread_safe (0.3.6)
|
133
|
+
tzinfo (1.2.5)
|
125
134
|
thread_safe (~> 0.1)
|
126
|
-
|
135
|
+
websocket-driver (0.7.1)
|
136
|
+
websocket-extensions (>= 0.1.0)
|
137
|
+
websocket-extensions (0.1.4)
|
138
|
+
yard (0.9.20)
|
139
|
+
zeitwerk (2.1.10)
|
127
140
|
|
128
141
|
PLATFORMS
|
129
142
|
ruby
|
@@ -132,8 +145,8 @@ DEPENDENCIES
|
|
132
145
|
acl9!
|
133
146
|
appraisal
|
134
147
|
byebug
|
135
|
-
codeclimate-test-reporter
|
136
|
-
minitap
|
137
148
|
sqlite3
|
138
|
-
tapout
|
139
149
|
yard
|
150
|
+
|
151
|
+
BUNDLED WITH
|
152
|
+
2.2.10
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# acl9
|
2
2
|
|
3
|
-
[![Travis-CI](https://travis-ci.org/be9/acl9.svg?branch=master)](https://travis-ci.org/be9/acl9)
|
3
|
+
[![Travis-CI](https://travis-ci.org/be9/acl9.svg?branch=master)](https://travis-ci.org/be9/acl9)
|
4
4
|
|
5
5
|
Acl9 is a role-based authorization system that provides a concise DSL for
|
6
6
|
securing your Rails application.
|
@@ -15,11 +15,19 @@ permissions correct.
|
|
15
15
|
Acl9 is [Semantically Versioned](http://semver.org/), so just add this to your
|
16
16
|
`Gemfile`:
|
17
17
|
|
18
|
+
```ruby
|
19
|
+
gem 'acl9', '~> 3.2'
|
20
|
+
```
|
21
|
+
|
22
|
+
You will need Ruby > 2.0
|
23
|
+
|
24
|
+
### Rails 4 - stick with 2.x
|
25
|
+
|
18
26
|
```ruby
|
19
27
|
gem 'acl9', '~> 2.0'
|
20
28
|
```
|
21
29
|
|
22
|
-
|
30
|
+
### Rails < 4 - upgrade Rails!
|
23
31
|
|
24
32
|
We dropped support for Rails < 4 in the 1.x releases, so if you're still using
|
25
33
|
Rails 2.x or 3.x then you'll want this:
|
@@ -289,8 +297,7 @@ doing things that they think are going to work but actually aren't like:
|
|
289
297
|
|
290
298
|
## Community
|
291
299
|
|
292
|
-
**
|
293
|
-
this](http://webchat.freenode.net/) if you have no other option.
|
300
|
+
**Gitter:** [Join the gitter chat here](https://gitter.im/be9/acl9)
|
294
301
|
|
295
302
|
**docs:** Rdocs are available [here](http://rdoc.info/projects/be9/acl9).
|
296
303
|
|
data/Rakefile
CHANGED
data/acl9.gemspec
CHANGED
@@ -20,10 +20,8 @@ Gem::Specification.new do |s|
|
|
20
20
|
|
21
21
|
s.rdoc_options = ["--charset=UTF-8"]
|
22
22
|
|
23
|
-
s.add_dependency "rails", '
|
23
|
+
s.add_dependency "rails", '>= 5.0', '< 7.0'
|
24
24
|
|
25
|
-
s.add_development_dependency "codeclimate-test-reporter"
|
26
25
|
s.add_development_dependency "yard"
|
27
26
|
s.add_development_dependency 'sqlite3'
|
28
27
|
end
|
29
|
-
|