activeadmin-cancan 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/lib/activeadmin-cancan/authorization.rb +9 -1
- data/lib/activeadmin-cancan/version.rb +1 -1
- data/test/dummy/db/database.yml +9 -0
- data/test/dummy/log/test.log +8 -0
- metadata +28 -9
data/README.rdoc
CHANGED
@@ -34,7 +34,7 @@ If the user authorization fails, a <tt>CanCan::AccessDenied</tt> exception will
|
|
34
34
|
|
35
35
|
def current_ability
|
36
36
|
@current_ability ||= Ability.new(current_admin_user)
|
37
|
-
end
|
37
|
+
end
|
38
38
|
end
|
39
39
|
|
40
40
|
See CanCan page [https://github.com/ryanb/cancan/wiki/exception-handling] for more information.
|
@@ -8,7 +8,7 @@ ActiveAdmin::Namespace.class_eval do
|
|
8
8
|
register_resource_controller(config)
|
9
9
|
resource_dsl.prepare_menu(config)
|
10
10
|
config = old_register(resource_class, options, &block)
|
11
|
-
config.controller.
|
11
|
+
config.controller.load_and_authorize_resource
|
12
12
|
config
|
13
13
|
end
|
14
14
|
end
|
@@ -22,3 +22,11 @@ ActiveAdmin::DSL.class_eval do
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
25
|
+
|
26
|
+
CanCan::ControllerResource.class_eval do
|
27
|
+
def collection_instance=(instance)
|
28
|
+
end
|
29
|
+
|
30
|
+
def resource_instance=(instance)
|
31
|
+
end
|
32
|
+
end
|
data/test/dummy/log/test.log
CHANGED
@@ -192,3 +192,11 @@
|
|
192
192
|
[1m[35m (0.1ms)[0m rollback transaction
|
193
193
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
194
194
|
[1m[35m (0.1ms)[0m rollback transaction
|
195
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
196
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
197
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
198
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
199
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
200
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
201
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
202
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin-cancan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-14 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &70366631082800 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70366631082800
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: cancan
|
27
|
-
requirement: &
|
27
|
+
requirement: &70366631081600 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.6.2
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70366631081600
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: activeadmin
|
38
|
-
requirement: &
|
38
|
+
requirement: &70366631080100 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,18 @@ dependencies:
|
|
43
43
|
version: 0.4.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70366631080100
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: sqlite3
|
49
|
+
requirement: &70366631079060 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70366631079060
|
47
58
|
description: Provides CanCan roles to ActiveAdmin
|
48
59
|
email:
|
49
60
|
- laurent@11factory.fr
|
@@ -80,6 +91,7 @@ files:
|
|
80
91
|
- test/dummy/config/locales/en.yml
|
81
92
|
- test/dummy/config/routes.rb
|
82
93
|
- test/dummy/config.ru
|
94
|
+
- test/dummy/db/database.yml
|
83
95
|
- test/dummy/db/test.sqlite3
|
84
96
|
- test/dummy/log/test.log
|
85
97
|
- test/dummy/public/404.html
|
@@ -102,15 +114,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
102
114
|
- - ! '>='
|
103
115
|
- !ruby/object:Gem::Version
|
104
116
|
version: '0'
|
117
|
+
segments:
|
118
|
+
- 0
|
119
|
+
hash: 1370845984403649450
|
105
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
121
|
none: false
|
107
122
|
requirements:
|
108
123
|
- - ! '>='
|
109
124
|
- !ruby/object:Gem::Version
|
110
125
|
version: '0'
|
126
|
+
segments:
|
127
|
+
- 0
|
128
|
+
hash: 1370845984403649450
|
111
129
|
requirements: []
|
112
130
|
rubyforge_project:
|
113
|
-
rubygems_version: 1.
|
131
|
+
rubygems_version: 1.7.2
|
114
132
|
signing_key:
|
115
133
|
specification_version: 3
|
116
134
|
summary: Provides CanCan roles to ActiveAdmin
|
@@ -137,6 +155,7 @@ test_files:
|
|
137
155
|
- test/dummy/config/locales/en.yml
|
138
156
|
- test/dummy/config/routes.rb
|
139
157
|
- test/dummy/config.ru
|
158
|
+
- test/dummy/db/database.yml
|
140
159
|
- test/dummy/db/test.sqlite3
|
141
160
|
- test/dummy/log/test.log
|
142
161
|
- test/dummy/public/404.html
|