action_access 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/CONTRIBUTING.md +4 -3
- data/Gemfile.lock +70 -51
- data/README.md +3 -3
- data/lib/action_access/keeper.rb +1 -1
- data/lib/action_access/version.rb +1 -1
- data/test/dummy/config/environments/production.rb +1 -1
- data/test/dummy/config/environments/test.rb +4 -1
- data/test/dummy/db/migrate/20140926071026_create_users.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8064bbe60e63e09b2aff74ea089abdf60d3bfaf9
|
4
|
+
data.tar.gz: 4e4568f7bf4292c9e83c314b6dc21ce2db04cdd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1ee3d030dafa6cff846430ec1ac922c2dea3ced3082eb6f07087df49c2e13c6068d1cda14d1120c8c9892f116ae55cb2e078a2b3359bbe1aad2ca14fd32829f
|
7
|
+
data.tar.gz: a889877401c7eb09577c8b29cc8387f36b404c5fc8a0a13d2f1e7ab0e1bcc1fd0c386bb8cc8a0dedb6d234c9cf6111867b36b06c3c5a3d5c8f4bce8a78d7ebf7
|
data/.travis.yml
CHANGED
data/CONTRIBUTING.md
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
## Please read before contributing
|
2
2
|
|
3
3
|
1. If you have questions about Action Access, use the
|
4
|
-
[Mailing List](https://groups.google.com/d/forum/action_access)
|
4
|
+
[Mailing List](https://groups.google.com/d/forum/action_access),
|
5
|
+
[Gitter's chat](https://gitter.im/matiasgagliano/action_access) or
|
5
6
|
[Stack Overflow](https://stackoverflow.com/questions/tagged/action_access).
|
6
|
-
|
7
|
+
**DO NOT** post questions here.
|
7
8
|
|
8
9
|
2. If you find a security bug, **DO NOT** submit an issue here.
|
9
10
|
Please send an e-mail to [mgag.issues@gmail.com](mailto:mgag.issues@gmail.com)
|
10
11
|
instead.
|
11
12
|
|
12
13
|
3. Do a small search on the issues tracker before submitting your issue to
|
13
|
-
see if it was already reported or fixed. In case it
|
14
|
+
see if it was already reported or fixed. In case it wasn't, create your report
|
14
15
|
with a **clear description** of the issue and a **code sample** that
|
15
16
|
demonstrates it. Include Rails and Action Access versions, and as much relevant
|
16
17
|
information as possible. Tests or a sample application showing how the
|
data/Gemfile.lock
CHANGED
@@ -1,81 +1,100 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
action_access (0.0.
|
4
|
+
action_access (0.0.3)
|
5
5
|
rails (~> 4.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actionmailer (4.
|
11
|
-
actionpack (= 4.
|
12
|
-
actionview (= 4.
|
10
|
+
actionmailer (4.2.2)
|
11
|
+
actionpack (= 4.2.2)
|
12
|
+
actionview (= 4.2.2)
|
13
|
+
activejob (= 4.2.2)
|
13
14
|
mail (~> 2.5, >= 2.5.4)
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
16
|
+
actionpack (4.2.2)
|
17
|
+
actionview (= 4.2.2)
|
18
|
+
activesupport (= 4.2.2)
|
19
|
+
rack (~> 1.6)
|
18
20
|
rack-test (~> 0.6.2)
|
19
|
-
|
20
|
-
|
21
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
22
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
23
|
+
actionview (4.2.2)
|
24
|
+
activesupport (= 4.2.2)
|
21
25
|
builder (~> 3.1)
|
22
26
|
erubis (~> 2.7.0)
|
23
|
-
|
24
|
-
|
27
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
28
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
29
|
+
activejob (4.2.2)
|
30
|
+
activesupport (= 4.2.2)
|
31
|
+
globalid (>= 0.3.0)
|
32
|
+
activemodel (4.2.2)
|
33
|
+
activesupport (= 4.2.2)
|
25
34
|
builder (~> 3.1)
|
26
|
-
activerecord (4.
|
27
|
-
activemodel (= 4.
|
28
|
-
activesupport (= 4.
|
29
|
-
arel (~>
|
30
|
-
activesupport (4.
|
31
|
-
i18n (~> 0.
|
35
|
+
activerecord (4.2.2)
|
36
|
+
activemodel (= 4.2.2)
|
37
|
+
activesupport (= 4.2.2)
|
38
|
+
arel (~> 6.0)
|
39
|
+
activesupport (4.2.2)
|
40
|
+
i18n (~> 0.7)
|
32
41
|
json (~> 1.7, >= 1.7.7)
|
33
42
|
minitest (~> 5.1)
|
34
|
-
thread_safe (~> 0.
|
43
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
35
44
|
tzinfo (~> 1.1)
|
36
|
-
arel (
|
45
|
+
arel (6.0.0)
|
37
46
|
builder (3.2.2)
|
38
47
|
erubis (2.7.0)
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
48
|
+
globalid (0.3.5)
|
49
|
+
activesupport (>= 4.1.0)
|
50
|
+
i18n (0.7.0)
|
51
|
+
json (1.8.3)
|
52
|
+
loofah (2.0.2)
|
53
|
+
nokogiri (>= 1.5.9)
|
54
|
+
mail (2.6.3)
|
43
55
|
mime-types (>= 1.16, < 3)
|
44
|
-
mime-types (2.
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
56
|
+
mime-types (2.6.1)
|
57
|
+
mini_portile (0.6.2)
|
58
|
+
minitest (5.7.0)
|
59
|
+
nokogiri (1.6.6.2)
|
60
|
+
mini_portile (~> 0.6.0)
|
61
|
+
rack (1.6.4)
|
62
|
+
rack-test (0.6.3)
|
49
63
|
rack (>= 1.0)
|
50
|
-
rails (4.
|
51
|
-
actionmailer (= 4.
|
52
|
-
actionpack (= 4.
|
53
|
-
actionview (= 4.
|
54
|
-
|
55
|
-
|
56
|
-
|
64
|
+
rails (4.2.2)
|
65
|
+
actionmailer (= 4.2.2)
|
66
|
+
actionpack (= 4.2.2)
|
67
|
+
actionview (= 4.2.2)
|
68
|
+
activejob (= 4.2.2)
|
69
|
+
activemodel (= 4.2.2)
|
70
|
+
activerecord (= 4.2.2)
|
71
|
+
activesupport (= 4.2.2)
|
57
72
|
bundler (>= 1.3.0, < 2.0)
|
58
|
-
railties (= 4.
|
59
|
-
sprockets-rails
|
60
|
-
|
61
|
-
|
62
|
-
|
73
|
+
railties (= 4.2.2)
|
74
|
+
sprockets-rails
|
75
|
+
rails-deprecated_sanitizer (1.0.3)
|
76
|
+
activesupport (>= 4.2.0.alpha)
|
77
|
+
rails-dom-testing (1.0.6)
|
78
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
79
|
+
nokogiri (~> 1.6.0)
|
80
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
81
|
+
rails-html-sanitizer (1.0.2)
|
82
|
+
loofah (~> 2.0)
|
83
|
+
railties (4.2.2)
|
84
|
+
actionpack (= 4.2.2)
|
85
|
+
activesupport (= 4.2.2)
|
63
86
|
rake (>= 0.8.7)
|
64
87
|
thor (>= 0.18.1, < 2.0)
|
65
|
-
rake (10.
|
66
|
-
sprockets (2.
|
67
|
-
hike (~> 1.2)
|
68
|
-
multi_json (~> 1.0)
|
88
|
+
rake (10.4.2)
|
89
|
+
sprockets (3.2.0)
|
69
90
|
rack (~> 1.0)
|
70
|
-
|
71
|
-
sprockets-rails (2.1.4)
|
91
|
+
sprockets-rails (2.3.1)
|
72
92
|
actionpack (>= 3.0)
|
73
93
|
activesupport (>= 3.0)
|
74
|
-
sprockets (
|
75
|
-
sqlite3 (1.3.
|
94
|
+
sprockets (>= 2.8, < 4.0)
|
95
|
+
sqlite3 (1.3.10)
|
76
96
|
thor (0.19.1)
|
77
|
-
thread_safe (0.3.
|
78
|
-
tilt (1.4.1)
|
97
|
+
thread_safe (0.3.5)
|
79
98
|
tzinfo (1.2.2)
|
80
99
|
thread_safe (~> 0.1)
|
81
100
|
|
data/README.md
CHANGED
@@ -263,9 +263,9 @@ The **keeper** is the core of Action Access, it's the one that registers
|
|
263
263
|
permissions and who decides if a clearance level grants access or not.
|
264
264
|
|
265
265
|
It's available as `keeper` within controllers and views and as
|
266
|
-
`ActionAccess::Keeper.instance` anywhere else. You can use it check
|
267
|
-
with the `lets?` method
|
268
|
-
the rest are the same as `can?`.
|
266
|
+
`ActionAccess::Keeper.instance` anywhere else. You can use it to check
|
267
|
+
permissions with the `lets?` method, which takes the clearance level as the
|
268
|
+
first argument and the rest are the same as for `can?`.
|
269
269
|
|
270
270
|
```ruby
|
271
271
|
# Filter a list of users to only those allowed to edit articles.
|
data/lib/action_access/keeper.rb
CHANGED
@@ -20,7 +20,7 @@ Rails.application.configure do
|
|
20
20
|
# config.action_dispatch.rack_cache = true
|
21
21
|
|
22
22
|
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
-
config.
|
23
|
+
config.serve_static_files = false
|
24
24
|
|
25
25
|
# Compress JavaScripts and CSS.
|
26
26
|
config.assets.js_compressor = :uglifier
|
@@ -7,13 +7,16 @@ Rails.application.configure do
|
|
7
7
|
# and recreated between test runs. Don't rely on the data there!
|
8
8
|
config.cache_classes = true
|
9
9
|
|
10
|
+
# Test order
|
11
|
+
config.active_support.test_order = :random
|
12
|
+
|
10
13
|
# Do not eager load code on boot. This avoids loading your whole application
|
11
14
|
# just for the purpose of running a single test. If you are using a tool that
|
12
15
|
# preloads Rails for running tests, you may have to set it to true.
|
13
16
|
config.eager_load = false
|
14
17
|
|
15
18
|
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
-
config.
|
19
|
+
config.serve_static_files = false
|
17
20
|
config.static_cache_control = 'public, max-age=3600'
|
18
21
|
|
19
22
|
# Show full error reports and disable caching.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_access
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matías A. Gagliano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
version: '0'
|
168
168
|
requirements: []
|
169
169
|
rubyforge_project:
|
170
|
-
rubygems_version: 2.
|
170
|
+
rubygems_version: 2.4.5
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: Access control system for Ruby on Rails.
|