ae_declarative_authorization 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +5 -5
  2. data/Appraisals +31 -21
  3. data/CHANGELOG +189 -189
  4. data/Gemfile +7 -7
  5. data/Gemfile.lock +68 -60
  6. data/LICENSE.txt +20 -20
  7. data/README.md +620 -620
  8. data/README.rdoc +597 -597
  9. data/Rakefile +35 -33
  10. data/authorization_rules.dist.rb +20 -20
  11. data/declarative_authorization.gemspec +24 -24
  12. data/gemfiles/rails4252.gemfile +10 -10
  13. data/gemfiles/rails4252.gemfile.lock +126 -0
  14. data/gemfiles/rails4271.gemfile +10 -10
  15. data/gemfiles/rails4271.gemfile.lock +126 -0
  16. data/gemfiles/rails507.gemfile +11 -11
  17. data/gemfiles/rails507.gemfile.lock +136 -0
  18. data/gemfiles/rails516.gemfile +11 -0
  19. data/gemfiles/rails516.gemfile.lock +136 -0
  20. data/gemfiles/rails521.gemfile +11 -0
  21. data/gemfiles/rails521.gemfile.lock +144 -0
  22. data/init.rb +5 -5
  23. data/lib/declarative_authorization.rb +18 -18
  24. data/lib/declarative_authorization/authorization.rb +821 -821
  25. data/lib/declarative_authorization/helper.rb +78 -78
  26. data/lib/declarative_authorization/in_controller.rb +713 -713
  27. data/lib/declarative_authorization/in_model.rb +156 -156
  28. data/lib/declarative_authorization/maintenance.rb +215 -215
  29. data/lib/declarative_authorization/obligation_scope.rb +348 -345
  30. data/lib/declarative_authorization/railsengine.rb +5 -5
  31. data/lib/declarative_authorization/reader.rb +549 -549
  32. data/lib/declarative_authorization/test/helpers.rb +261 -261
  33. data/lib/declarative_authorization/version.rb +3 -3
  34. data/lib/generators/authorization/install/install_generator.rb +77 -77
  35. data/lib/generators/authorization/rules/rules_generator.rb +13 -13
  36. data/lib/generators/authorization/rules/templates/authorization_rules.rb +27 -27
  37. data/lib/tasks/authorization_tasks.rake +89 -89
  38. data/log/test.log +15246 -0
  39. data/pkg/ae_declarative_authorization-0.7.1.gem +0 -0
  40. data/pkg/ae_declarative_authorization-0.8.0.gem +0 -0
  41. data/test/authorization_test.rb +1121 -1121
  42. data/test/controller_filter_resource_access_test.rb +573 -573
  43. data/test/controller_test.rb +478 -478
  44. data/test/database.yml +3 -3
  45. data/test/dsl_reader_test.rb +178 -178
  46. data/test/functional/filter_access_to_with_id_in_scope_test.rb +88 -88
  47. data/test/functional/no_filter_access_to_test.rb +79 -79
  48. data/test/functional/params_block_arity_test.rb +39 -39
  49. data/test/helper_test.rb +248 -248
  50. data/test/maintenance_test.rb +46 -46
  51. data/test/model_test.rb +1840 -1840
  52. data/test/profiles/access_checking +20 -0
  53. data/test/schema.sql +60 -60
  54. data/test/test_helper.rb +174 -174
  55. data/test/test_support/minitest_compatibility.rb +26 -26
  56. metadata +17 -5
@@ -1,11 +1,11 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "appraisal", "~> 2.1"
6
- gem "mocha", "~> 1.0", require: false
7
- gem "sqlite3"
8
- gem "rails", "5.0.7"
9
- gem "rails-controller-testing"
10
-
11
- gemspec path: "../"
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "appraisal", "~> 2.1"
6
+ gem "mocha", "~> 1.0", require: false
7
+ gem "sqlite3"
8
+ gem "rails", "5.0.7"
9
+ gem "rails-controller-testing"
10
+
11
+ gemspec path: "../"
@@ -0,0 +1,136 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ ae_declarative_authorization (0.7.1)
5
+ blockenspiel (~> 0.5.0)
6
+ rails (>= 4.2.5.2, < 6)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ actioncable (5.0.7)
12
+ actionpack (= 5.0.7)
13
+ nio4r (>= 1.2, < 3.0)
14
+ websocket-driver (~> 0.6.1)
15
+ actionmailer (5.0.7)
16
+ actionpack (= 5.0.7)
17
+ actionview (= 5.0.7)
18
+ activejob (= 5.0.7)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.0.7)
22
+ actionview (= 5.0.7)
23
+ activesupport (= 5.0.7)
24
+ rack (~> 2.0)
25
+ rack-test (~> 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
+ actionview (5.0.7)
29
+ activesupport (= 5.0.7)
30
+ builder (~> 3.1)
31
+ erubis (~> 2.7.0)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
+ activejob (5.0.7)
35
+ activesupport (= 5.0.7)
36
+ globalid (>= 0.3.6)
37
+ activemodel (5.0.7)
38
+ activesupport (= 5.0.7)
39
+ activerecord (5.0.7)
40
+ activemodel (= 5.0.7)
41
+ activesupport (= 5.0.7)
42
+ arel (~> 7.0)
43
+ activesupport (5.0.7)
44
+ concurrent-ruby (~> 1.0, >= 1.0.2)
45
+ i18n (>= 0.7, < 2)
46
+ minitest (~> 5.1)
47
+ tzinfo (~> 1.1)
48
+ appraisal (2.2.0)
49
+ bundler
50
+ rake
51
+ thor (>= 0.14.0)
52
+ arel (7.1.4)
53
+ blockenspiel (0.5.0)
54
+ builder (3.2.3)
55
+ concurrent-ruby (1.0.5)
56
+ crass (1.0.4)
57
+ erubis (2.7.0)
58
+ globalid (0.4.1)
59
+ activesupport (>= 4.2.0)
60
+ i18n (1.1.0)
61
+ concurrent-ruby (~> 1.0)
62
+ loofah (2.2.2)
63
+ crass (~> 1.0.2)
64
+ nokogiri (>= 1.5.9)
65
+ mail (2.7.0)
66
+ mini_mime (>= 0.1.1)
67
+ metaclass (0.0.4)
68
+ method_source (0.9.0)
69
+ mini_mime (1.0.1)
70
+ mini_portile2 (2.3.0)
71
+ minitest (5.8.5)
72
+ mocha (1.7.0)
73
+ metaclass (~> 0.0.1)
74
+ nio4r (2.3.1)
75
+ nokogiri (1.8.4)
76
+ mini_portile2 (~> 2.3.0)
77
+ rack (2.0.5)
78
+ rack-test (0.6.3)
79
+ rack (>= 1.0)
80
+ rails (5.0.7)
81
+ actioncable (= 5.0.7)
82
+ actionmailer (= 5.0.7)
83
+ actionpack (= 5.0.7)
84
+ actionview (= 5.0.7)
85
+ activejob (= 5.0.7)
86
+ activemodel (= 5.0.7)
87
+ activerecord (= 5.0.7)
88
+ activesupport (= 5.0.7)
89
+ bundler (>= 1.3.0)
90
+ railties (= 5.0.7)
91
+ sprockets-rails (>= 2.0.0)
92
+ rails-controller-testing (1.0.2)
93
+ actionpack (~> 5.x, >= 5.0.1)
94
+ actionview (~> 5.x, >= 5.0.1)
95
+ activesupport (~> 5.x)
96
+ rails-dom-testing (2.0.3)
97
+ activesupport (>= 4.2.0)
98
+ nokogiri (>= 1.6)
99
+ rails-html-sanitizer (1.0.4)
100
+ loofah (~> 2.2, >= 2.2.2)
101
+ railties (5.0.7)
102
+ actionpack (= 5.0.7)
103
+ activesupport (= 5.0.7)
104
+ method_source
105
+ rake (>= 0.8.7)
106
+ thor (>= 0.18.1, < 2.0)
107
+ rake (12.3.1)
108
+ sprockets (3.7.2)
109
+ concurrent-ruby (~> 1.0)
110
+ rack (> 1, < 3)
111
+ sprockets-rails (3.2.1)
112
+ actionpack (>= 4.0)
113
+ activesupport (>= 4.0)
114
+ sprockets (>= 3.0.0)
115
+ sqlite3 (1.3.13)
116
+ thor (0.20.0)
117
+ thread_safe (0.3.6)
118
+ tzinfo (1.2.5)
119
+ thread_safe (~> 0.1)
120
+ websocket-driver (0.6.5)
121
+ websocket-extensions (>= 0.1.0)
122
+ websocket-extensions (0.1.3)
123
+
124
+ PLATFORMS
125
+ ruby
126
+
127
+ DEPENDENCIES
128
+ ae_declarative_authorization!
129
+ appraisal (~> 2.1)
130
+ mocha (~> 1.0)
131
+ rails (= 5.0.7)
132
+ rails-controller-testing
133
+ sqlite3
134
+
135
+ BUNDLED WITH
136
+ 1.16.3
@@ -0,0 +1,11 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "appraisal", "~> 2.1"
6
+ gem "mocha", "~> 1.0", require: false
7
+ gem "sqlite3"
8
+ gem "rails", "5.1.6"
9
+ gem "rails-controller-testing"
10
+
11
+ gemspec path: "../"
@@ -0,0 +1,136 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ ae_declarative_authorization (0.7.1)
5
+ blockenspiel (~> 0.5.0)
6
+ rails (>= 4.2.5.2, < 6)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ actioncable (5.1.6)
12
+ actionpack (= 5.1.6)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (~> 0.6.1)
15
+ actionmailer (5.1.6)
16
+ actionpack (= 5.1.6)
17
+ actionview (= 5.1.6)
18
+ activejob (= 5.1.6)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.1.6)
22
+ actionview (= 5.1.6)
23
+ activesupport (= 5.1.6)
24
+ rack (~> 2.0)
25
+ rack-test (>= 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
+ actionview (5.1.6)
29
+ activesupport (= 5.1.6)
30
+ builder (~> 3.1)
31
+ erubi (~> 1.4)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
+ activejob (5.1.6)
35
+ activesupport (= 5.1.6)
36
+ globalid (>= 0.3.6)
37
+ activemodel (5.1.6)
38
+ activesupport (= 5.1.6)
39
+ activerecord (5.1.6)
40
+ activemodel (= 5.1.6)
41
+ activesupport (= 5.1.6)
42
+ arel (~> 8.0)
43
+ activesupport (5.1.6)
44
+ concurrent-ruby (~> 1.0, >= 1.0.2)
45
+ i18n (>= 0.7, < 2)
46
+ minitest (~> 5.1)
47
+ tzinfo (~> 1.1)
48
+ appraisal (2.2.0)
49
+ bundler
50
+ rake
51
+ thor (>= 0.14.0)
52
+ arel (8.0.0)
53
+ blockenspiel (0.5.0)
54
+ builder (3.2.3)
55
+ concurrent-ruby (1.0.5)
56
+ crass (1.0.4)
57
+ erubi (1.7.1)
58
+ globalid (0.4.1)
59
+ activesupport (>= 4.2.0)
60
+ i18n (1.1.0)
61
+ concurrent-ruby (~> 1.0)
62
+ loofah (2.2.2)
63
+ crass (~> 1.0.2)
64
+ nokogiri (>= 1.5.9)
65
+ mail (2.7.0)
66
+ mini_mime (>= 0.1.1)
67
+ metaclass (0.0.4)
68
+ method_source (0.9.0)
69
+ mini_mime (1.0.1)
70
+ mini_portile2 (2.3.0)
71
+ minitest (5.11.3)
72
+ mocha (1.7.0)
73
+ metaclass (~> 0.0.1)
74
+ nio4r (2.3.1)
75
+ nokogiri (1.8.4)
76
+ mini_portile2 (~> 2.3.0)
77
+ rack (2.0.5)
78
+ rack-test (1.1.0)
79
+ rack (>= 1.0, < 3)
80
+ rails (5.1.6)
81
+ actioncable (= 5.1.6)
82
+ actionmailer (= 5.1.6)
83
+ actionpack (= 5.1.6)
84
+ actionview (= 5.1.6)
85
+ activejob (= 5.1.6)
86
+ activemodel (= 5.1.6)
87
+ activerecord (= 5.1.6)
88
+ activesupport (= 5.1.6)
89
+ bundler (>= 1.3.0)
90
+ railties (= 5.1.6)
91
+ sprockets-rails (>= 2.0.0)
92
+ rails-controller-testing (1.0.2)
93
+ actionpack (~> 5.x, >= 5.0.1)
94
+ actionview (~> 5.x, >= 5.0.1)
95
+ activesupport (~> 5.x)
96
+ rails-dom-testing (2.0.3)
97
+ activesupport (>= 4.2.0)
98
+ nokogiri (>= 1.6)
99
+ rails-html-sanitizer (1.0.4)
100
+ loofah (~> 2.2, >= 2.2.2)
101
+ railties (5.1.6)
102
+ actionpack (= 5.1.6)
103
+ activesupport (= 5.1.6)
104
+ method_source
105
+ rake (>= 0.8.7)
106
+ thor (>= 0.18.1, < 2.0)
107
+ rake (12.3.1)
108
+ sprockets (3.7.2)
109
+ concurrent-ruby (~> 1.0)
110
+ rack (> 1, < 3)
111
+ sprockets-rails (3.2.1)
112
+ actionpack (>= 4.0)
113
+ activesupport (>= 4.0)
114
+ sprockets (>= 3.0.0)
115
+ sqlite3 (1.3.13)
116
+ thor (0.20.0)
117
+ thread_safe (0.3.6)
118
+ tzinfo (1.2.5)
119
+ thread_safe (~> 0.1)
120
+ websocket-driver (0.6.5)
121
+ websocket-extensions (>= 0.1.0)
122
+ websocket-extensions (0.1.3)
123
+
124
+ PLATFORMS
125
+ ruby
126
+
127
+ DEPENDENCIES
128
+ ae_declarative_authorization!
129
+ appraisal (~> 2.1)
130
+ mocha (~> 1.0)
131
+ rails (= 5.1.6)
132
+ rails-controller-testing
133
+ sqlite3
134
+
135
+ BUNDLED WITH
136
+ 1.16.3
@@ -0,0 +1,11 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "appraisal", "~> 2.1"
6
+ gem "mocha", "~> 1.0", require: false
7
+ gem "sqlite3"
8
+ gem "rails", "5.2.1"
9
+ gem "rails-controller-testing"
10
+
11
+ gemspec path: "../"
@@ -0,0 +1,144 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ ae_declarative_authorization (0.7.1)
5
+ blockenspiel (~> 0.5.0)
6
+ rails (>= 4.2.5.2, < 6)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ actioncable (5.2.1)
12
+ actionpack (= 5.2.1)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (>= 0.6.1)
15
+ actionmailer (5.2.1)
16
+ actionpack (= 5.2.1)
17
+ actionview (= 5.2.1)
18
+ activejob (= 5.2.1)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.2.1)
22
+ actionview (= 5.2.1)
23
+ activesupport (= 5.2.1)
24
+ rack (~> 2.0)
25
+ rack-test (>= 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
+ actionview (5.2.1)
29
+ activesupport (= 5.2.1)
30
+ builder (~> 3.1)
31
+ erubi (~> 1.4)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
+ activejob (5.2.1)
35
+ activesupport (= 5.2.1)
36
+ globalid (>= 0.3.6)
37
+ activemodel (5.2.1)
38
+ activesupport (= 5.2.1)
39
+ activerecord (5.2.1)
40
+ activemodel (= 5.2.1)
41
+ activesupport (= 5.2.1)
42
+ arel (>= 9.0)
43
+ activestorage (5.2.1)
44
+ actionpack (= 5.2.1)
45
+ activerecord (= 5.2.1)
46
+ marcel (~> 0.3.1)
47
+ activesupport (5.2.1)
48
+ concurrent-ruby (~> 1.0, >= 1.0.2)
49
+ i18n (>= 0.7, < 2)
50
+ minitest (~> 5.1)
51
+ tzinfo (~> 1.1)
52
+ appraisal (2.2.0)
53
+ bundler
54
+ rake
55
+ thor (>= 0.14.0)
56
+ arel (9.0.0)
57
+ blockenspiel (0.5.0)
58
+ builder (3.2.3)
59
+ concurrent-ruby (1.0.5)
60
+ crass (1.0.4)
61
+ erubi (1.7.1)
62
+ globalid (0.4.1)
63
+ activesupport (>= 4.2.0)
64
+ i18n (1.1.0)
65
+ concurrent-ruby (~> 1.0)
66
+ loofah (2.2.2)
67
+ crass (~> 1.0.2)
68
+ nokogiri (>= 1.5.9)
69
+ mail (2.7.0)
70
+ mini_mime (>= 0.1.1)
71
+ marcel (0.3.2)
72
+ mimemagic (~> 0.3.2)
73
+ metaclass (0.0.4)
74
+ method_source (0.9.0)
75
+ mimemagic (0.3.2)
76
+ mini_mime (1.0.1)
77
+ mini_portile2 (2.3.0)
78
+ minitest (5.11.3)
79
+ mocha (1.7.0)
80
+ metaclass (~> 0.0.1)
81
+ nio4r (2.3.1)
82
+ nokogiri (1.8.4)
83
+ mini_portile2 (~> 2.3.0)
84
+ rack (2.0.5)
85
+ rack-test (1.1.0)
86
+ rack (>= 1.0, < 3)
87
+ rails (5.2.1)
88
+ actioncable (= 5.2.1)
89
+ actionmailer (= 5.2.1)
90
+ actionpack (= 5.2.1)
91
+ actionview (= 5.2.1)
92
+ activejob (= 5.2.1)
93
+ activemodel (= 5.2.1)
94
+ activerecord (= 5.2.1)
95
+ activestorage (= 5.2.1)
96
+ activesupport (= 5.2.1)
97
+ bundler (>= 1.3.0)
98
+ railties (= 5.2.1)
99
+ sprockets-rails (>= 2.0.0)
100
+ rails-controller-testing (1.0.2)
101
+ actionpack (~> 5.x, >= 5.0.1)
102
+ actionview (~> 5.x, >= 5.0.1)
103
+ activesupport (~> 5.x)
104
+ rails-dom-testing (2.0.3)
105
+ activesupport (>= 4.2.0)
106
+ nokogiri (>= 1.6)
107
+ rails-html-sanitizer (1.0.4)
108
+ loofah (~> 2.2, >= 2.2.2)
109
+ railties (5.2.1)
110
+ actionpack (= 5.2.1)
111
+ activesupport (= 5.2.1)
112
+ method_source
113
+ rake (>= 0.8.7)
114
+ thor (>= 0.19.0, < 2.0)
115
+ rake (12.3.1)
116
+ sprockets (3.7.2)
117
+ concurrent-ruby (~> 1.0)
118
+ rack (> 1, < 3)
119
+ sprockets-rails (3.2.1)
120
+ actionpack (>= 4.0)
121
+ activesupport (>= 4.0)
122
+ sprockets (>= 3.0.0)
123
+ sqlite3 (1.3.13)
124
+ thor (0.20.0)
125
+ thread_safe (0.3.6)
126
+ tzinfo (1.2.5)
127
+ thread_safe (~> 0.1)
128
+ websocket-driver (0.7.0)
129
+ websocket-extensions (>= 0.1.0)
130
+ websocket-extensions (0.1.3)
131
+
132
+ PLATFORMS
133
+ ruby
134
+
135
+ DEPENDENCIES
136
+ ae_declarative_authorization!
137
+ appraisal (~> 2.1)
138
+ mocha (~> 1.0)
139
+ rails (= 5.2.1)
140
+ rails-controller-testing
141
+ sqlite3
142
+
143
+ BUNDLED WITH
144
+ 1.16.3