trust 0.8.3 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +33 -1
- data/lib/trust.rb +9 -0
- data/lib/trust/authorization.rb +83 -36
- data/lib/trust/controller.rb +32 -8
- data/lib/trust/controller/properties.rb +12 -0
- data/lib/trust/controller/resource.rb +79 -11
- data/lib/trust/permissions.rb +177 -24
- data/lib/trust/version.rb +1 -1
- data/test/dummy/app/controllers/accounts_controller.rb +2 -2
- data/test/dummy/app/controllers/clients_controller.rb +1 -1
- data/test/dummy/app/controllers/mongo_accounts_controller.rb +5 -4
- data/test/dummy/app/controllers/mongo_clients_controller.rb +1 -1
- data/test/dummy/app/controllers/users_controller.rb +1 -5
- data/test/dummy/app/models/account.rb +1 -1
- data/test/dummy/app/models/client.rb +1 -1
- data/test/dummy/app/models/permissions.rb +18 -11
- data/test/dummy/app/models/user.rb +1 -1
- data/test/dummy/app/views/accounts/edit.html.erb +1 -1
- data/test/dummy/app/views/accounts/show.html.erb +1 -1
- data/test/dummy/app/views/mongo_accounts/_form.html.erb +1 -1
- data/test/dummy/app/views/mongo_accounts/edit.html.erb +2 -2
- data/test/dummy/app/views/mongo_accounts/index.html.erb +3 -3
- data/test/dummy/app/views/mongo_accounts/show.html.erb +2 -2
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config/application.rb +3 -34
- data/test/dummy/config/boot.rb +4 -9
- data/test/dummy/config/environment.rb +3 -3
- data/test/dummy/config/environments/development.rb +22 -18
- data/test/dummy/config/environments/production.rb +46 -34
- data/test/dummy/config/environments/test.rb +19 -14
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +6 -5
- data/test/dummy/config/initializers/mime_types.rb +0 -1
- data/test/dummy/config/initializers/session_store.rb +1 -6
- data/test/dummy/config/initializers/wrap_parameters.rb +6 -6
- data/test/dummy/config/locales/en.yml +20 -2
- data/test/dummy/config/mongoid.yml +16 -18
- data/test/dummy/config/routes.rb +3 -3
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +30 -0
- data/test/dummy/log/test.log +6382 -0
- data/test/dummy/test/functional/accounts_controller_test.rb +2 -2
- data/test/dummy/test/functional/mongo_accounts_controller_test.rb +8 -8
- data/test/dummy/test/functional/mongo_clients_controller_test.rb +1 -1
- data/test/dummy/test/unit/permissions_test.rb +1 -1
- data/test/dummy/tmp/cache/assets/test/sprockets/0e74e8595d4c5c03160356ab9bf6f67c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/189460d2a0f63f35d55c384e0beb9cc4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/371bf96e99717688ed7313a0c53f4212 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/4050a4e5062ab95c9f32e9b6940821ea +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/5f1a0d05e77ca8b9a1fc2a47e17a8174 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/6fc757c2c8329244ca95d6909865bbc2 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/75f67b2244ba6a4914d71df068f5fda9 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7ed0985e7e627ac5280078ee9c7078fe +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/86d19eda31629412e6817570ffde9a93 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/87b209c0c9da28094a8d5581a21262c6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/954318d0d3412eec67db5c2508ae5169 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/95c1a034126598a432130d7fc227c189 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b55283b385e5692ecf1b59332bbc5a11 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b678ce3482f77c68a19e697960645cb6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/ca9d9c205bcfa05de1ddd180f8ecc168 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d36f675d4251ea3868635d299f3bb166 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f56253b5f374fff1a33fbbc9881c9124 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/fe1f20fb032685e2e1fcad23f0ad6601 +0 -0
- data/test/test_helper.rb +6 -2
- data/test/trust_test.rb +4 -0
- data/test/unit/trust/authorization_test.rb +165 -71
- data/test/unit/trust/controller/properties_test.rb +15 -0
- data/test/unit/trust/controller/resource_test.rb +29 -9
- data/test/unit/trust/controller_test.rb +53 -40
- data/test/unit/trust/permissions_test.rb +196 -69
- metadata +93 -28
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trust
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Hanevold
|
@@ -9,39 +9,40 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-08-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: activesupport
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 3.0.
|
20
|
+
version: 3.0.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 3.0.
|
27
|
+
version: 3.0.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: activemodel
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
35
|
-
type: :
|
34
|
+
version: 3.0.0
|
35
|
+
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
42
|
-
description:
|
43
|
-
|
44
|
-
Ruby implementation language.
|
41
|
+
version: 3.0.0
|
42
|
+
description: "Trust is a resource oriented framework for authorization control. It
|
43
|
+
is compatible with Rails 3 and 4.\nIt has a loose coupling from the models, and
|
44
|
+
features a native Ruby implementation language. \nSupport for inheritance and namespaced
|
45
|
+
models as well as nested routes. Even permissions scheme supports inheritance.\n"
|
45
46
|
email:
|
46
47
|
- patrick.hanevold@gmail.com
|
47
48
|
- knut.stenmark@gmail.com
|
@@ -49,22 +50,24 @@ executables: []
|
|
49
50
|
extensions: []
|
50
51
|
extra_rdoc_files: []
|
51
52
|
files:
|
53
|
+
- MIT-LICENSE
|
54
|
+
- README.md
|
55
|
+
- Rakefile
|
52
56
|
- lib/tasks/trust_tasks.rake
|
57
|
+
- lib/trust.rb
|
53
58
|
- lib/trust/active_model.rb
|
54
59
|
- lib/trust/actor.rb
|
55
60
|
- lib/trust/authorization.rb
|
61
|
+
- lib/trust/controller.rb
|
56
62
|
- lib/trust/controller/properties.rb
|
57
63
|
- lib/trust/controller/resource.rb
|
58
|
-
- lib/trust/controller.rb
|
59
64
|
- lib/trust/exceptions.rb
|
60
65
|
- lib/trust/inheritable_attribute.rb
|
61
66
|
- lib/trust/permissions.rb
|
62
67
|
- lib/trust/test_helper.rb
|
63
68
|
- lib/trust/version.rb
|
64
|
-
-
|
65
|
-
-
|
66
|
-
- Rakefile
|
67
|
-
- README.md
|
69
|
+
- test/dummy/README.rdoc
|
70
|
+
- test/dummy/Rakefile
|
68
71
|
- test/dummy/app/assets/javascripts/accounts.js
|
69
72
|
- test/dummy/app/assets/javascripts/application.js
|
70
73
|
- test/dummy/app/assets/javascripts/clients.js
|
@@ -86,8 +89,8 @@ files:
|
|
86
89
|
- test/dummy/app/helpers/application_helper.rb
|
87
90
|
- test/dummy/app/helpers/clients_helper.rb
|
88
91
|
- test/dummy/app/helpers/users_helper.rb
|
89
|
-
- test/dummy/app/models/account/credit.rb
|
90
92
|
- test/dummy/app/models/account.rb
|
93
|
+
- test/dummy/app/models/account/credit.rb
|
91
94
|
- test/dummy/app/models/client.rb
|
92
95
|
- test/dummy/app/models/mongo_account.rb
|
93
96
|
- test/dummy/app/models/mongo_client.rb
|
@@ -120,6 +123,11 @@ files:
|
|
120
123
|
- test/dummy/app/views/users/index.html.erb
|
121
124
|
- test/dummy/app/views/users/new.html.erb
|
122
125
|
- test/dummy/app/views/users/show.html.erb
|
126
|
+
- test/dummy/bin/bundle
|
127
|
+
- test/dummy/bin/rails
|
128
|
+
- test/dummy/bin/rake
|
129
|
+
- test/dummy/bin/setup
|
130
|
+
- test/dummy/config.ru
|
123
131
|
- test/dummy/config/application.rb
|
124
132
|
- test/dummy/config/boot.rb
|
125
133
|
- test/dummy/config/database.yml
|
@@ -127,7 +135,10 @@ files:
|
|
127
135
|
- test/dummy/config/environments/development.rb
|
128
136
|
- test/dummy/config/environments/production.rb
|
129
137
|
- test/dummy/config/environments/test.rb
|
138
|
+
- test/dummy/config/initializers/assets.rb
|
130
139
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
140
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
141
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
131
142
|
- test/dummy/config/initializers/inflections.rb
|
132
143
|
- test/dummy/config/initializers/mime_types.rb
|
133
144
|
- test/dummy/config/initializers/secret_token.rb
|
@@ -136,7 +147,7 @@ files:
|
|
136
147
|
- test/dummy/config/locales/en.yml
|
137
148
|
- test/dummy/config/mongoid.yml
|
138
149
|
- test/dummy/config/routes.rb
|
139
|
-
- test/dummy/config.
|
150
|
+
- test/dummy/config/secrets.yml
|
140
151
|
- test/dummy/db/development.sqlite3
|
141
152
|
- test/dummy/db/migrate/20120522115011_create_accounts.rb
|
142
153
|
- test/dummy/db/migrate/20120522130322_create_users.rb
|
@@ -149,8 +160,6 @@ files:
|
|
149
160
|
- test/dummy/public/422.html
|
150
161
|
- test/dummy/public/500.html
|
151
162
|
- test/dummy/public/favicon.ico
|
152
|
-
- test/dummy/Rakefile
|
153
|
-
- test/dummy/README.rdoc
|
154
163
|
- test/dummy/script/rails
|
155
164
|
- test/dummy/test/fixtures/accounts.yml
|
156
165
|
- test/dummy/test/fixtures/clients.yml
|
@@ -167,6 +176,30 @@ files:
|
|
167
176
|
- test/dummy/test/unit/helpers/users_helper_test.rb
|
168
177
|
- test/dummy/test/unit/permissions_test.rb
|
169
178
|
- test/dummy/test/unit/user_test.rb
|
179
|
+
- test/dummy/tmp/cache/assets/test/sprockets/0e74e8595d4c5c03160356ab9bf6f67c
|
180
|
+
- test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
|
181
|
+
- test/dummy/tmp/cache/assets/test/sprockets/189460d2a0f63f35d55c384e0beb9cc4
|
182
|
+
- test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
183
|
+
- test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
|
184
|
+
- test/dummy/tmp/cache/assets/test/sprockets/371bf96e99717688ed7313a0c53f4212
|
185
|
+
- test/dummy/tmp/cache/assets/test/sprockets/4050a4e5062ab95c9f32e9b6940821ea
|
186
|
+
- test/dummy/tmp/cache/assets/test/sprockets/5f1a0d05e77ca8b9a1fc2a47e17a8174
|
187
|
+
- test/dummy/tmp/cache/assets/test/sprockets/6fc757c2c8329244ca95d6909865bbc2
|
188
|
+
- test/dummy/tmp/cache/assets/test/sprockets/75f67b2244ba6a4914d71df068f5fda9
|
189
|
+
- test/dummy/tmp/cache/assets/test/sprockets/7ed0985e7e627ac5280078ee9c7078fe
|
190
|
+
- test/dummy/tmp/cache/assets/test/sprockets/86d19eda31629412e6817570ffde9a93
|
191
|
+
- test/dummy/tmp/cache/assets/test/sprockets/87b209c0c9da28094a8d5581a21262c6
|
192
|
+
- test/dummy/tmp/cache/assets/test/sprockets/954318d0d3412eec67db5c2508ae5169
|
193
|
+
- test/dummy/tmp/cache/assets/test/sprockets/95c1a034126598a432130d7fc227c189
|
194
|
+
- test/dummy/tmp/cache/assets/test/sprockets/b55283b385e5692ecf1b59332bbc5a11
|
195
|
+
- test/dummy/tmp/cache/assets/test/sprockets/b678ce3482f77c68a19e697960645cb6
|
196
|
+
- test/dummy/tmp/cache/assets/test/sprockets/ca9d9c205bcfa05de1ddd180f8ecc168
|
197
|
+
- test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
198
|
+
- test/dummy/tmp/cache/assets/test/sprockets/d36f675d4251ea3868635d299f3bb166
|
199
|
+
- test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
200
|
+
- test/dummy/tmp/cache/assets/test/sprockets/f56253b5f374fff1a33fbbc9881c9124
|
201
|
+
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
202
|
+
- test/dummy/tmp/cache/assets/test/sprockets/fe1f20fb032685e2e1fcad23f0ad6601
|
170
203
|
- test/test_helper.rb
|
171
204
|
- test/trust_test.rb
|
172
205
|
- test/unit/trust/active_model_test.rb
|
@@ -186,17 +219,17 @@ require_paths:
|
|
186
219
|
- lib
|
187
220
|
required_ruby_version: !ruby/object:Gem::Requirement
|
188
221
|
requirements:
|
189
|
-
- -
|
222
|
+
- - ">="
|
190
223
|
- !ruby/object:Gem::Version
|
191
224
|
version: '0'
|
192
225
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
226
|
requirements:
|
194
|
-
- -
|
227
|
+
- - ">="
|
195
228
|
- !ruby/object:Gem::Version
|
196
229
|
version: '0'
|
197
230
|
requirements: []
|
198
231
|
rubyforge_project:
|
199
|
-
rubygems_version: 2.
|
232
|
+
rubygems_version: 2.4.5
|
200
233
|
signing_key:
|
201
234
|
specification_version: 4
|
202
235
|
summary: Trust is a framework for authorization control in RubyOnRails
|
@@ -256,6 +289,10 @@ test_files:
|
|
256
289
|
- test/dummy/app/views/users/index.html.erb
|
257
290
|
- test/dummy/app/views/users/new.html.erb
|
258
291
|
- test/dummy/app/views/users/show.html.erb
|
292
|
+
- test/dummy/bin/bundle
|
293
|
+
- test/dummy/bin/rails
|
294
|
+
- test/dummy/bin/rake
|
295
|
+
- test/dummy/bin/setup
|
259
296
|
- test/dummy/config/application.rb
|
260
297
|
- test/dummy/config/boot.rb
|
261
298
|
- test/dummy/config/database.yml
|
@@ -263,7 +300,10 @@ test_files:
|
|
263
300
|
- test/dummy/config/environments/development.rb
|
264
301
|
- test/dummy/config/environments/production.rb
|
265
302
|
- test/dummy/config/environments/test.rb
|
303
|
+
- test/dummy/config/initializers/assets.rb
|
266
304
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
305
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
306
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
267
307
|
- test/dummy/config/initializers/inflections.rb
|
268
308
|
- test/dummy/config/initializers/mime_types.rb
|
269
309
|
- test/dummy/config/initializers/secret_token.rb
|
@@ -272,6 +312,7 @@ test_files:
|
|
272
312
|
- test/dummy/config/locales/en.yml
|
273
313
|
- test/dummy/config/mongoid.yml
|
274
314
|
- test/dummy/config/routes.rb
|
315
|
+
- test/dummy/config/secrets.yml
|
275
316
|
- test/dummy/config.ru
|
276
317
|
- test/dummy/db/development.sqlite3
|
277
318
|
- test/dummy/db/migrate/20120522115011_create_accounts.rb
|
@@ -303,6 +344,30 @@ test_files:
|
|
303
344
|
- test/dummy/test/unit/helpers/users_helper_test.rb
|
304
345
|
- test/dummy/test/unit/permissions_test.rb
|
305
346
|
- test/dummy/test/unit/user_test.rb
|
347
|
+
- test/dummy/tmp/cache/assets/test/sprockets/0e74e8595d4c5c03160356ab9bf6f67c
|
348
|
+
- test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
|
349
|
+
- test/dummy/tmp/cache/assets/test/sprockets/189460d2a0f63f35d55c384e0beb9cc4
|
350
|
+
- test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
351
|
+
- test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
|
352
|
+
- test/dummy/tmp/cache/assets/test/sprockets/371bf96e99717688ed7313a0c53f4212
|
353
|
+
- test/dummy/tmp/cache/assets/test/sprockets/4050a4e5062ab95c9f32e9b6940821ea
|
354
|
+
- test/dummy/tmp/cache/assets/test/sprockets/5f1a0d05e77ca8b9a1fc2a47e17a8174
|
355
|
+
- test/dummy/tmp/cache/assets/test/sprockets/6fc757c2c8329244ca95d6909865bbc2
|
356
|
+
- test/dummy/tmp/cache/assets/test/sprockets/75f67b2244ba6a4914d71df068f5fda9
|
357
|
+
- test/dummy/tmp/cache/assets/test/sprockets/7ed0985e7e627ac5280078ee9c7078fe
|
358
|
+
- test/dummy/tmp/cache/assets/test/sprockets/86d19eda31629412e6817570ffde9a93
|
359
|
+
- test/dummy/tmp/cache/assets/test/sprockets/87b209c0c9da28094a8d5581a21262c6
|
360
|
+
- test/dummy/tmp/cache/assets/test/sprockets/954318d0d3412eec67db5c2508ae5169
|
361
|
+
- test/dummy/tmp/cache/assets/test/sprockets/95c1a034126598a432130d7fc227c189
|
362
|
+
- test/dummy/tmp/cache/assets/test/sprockets/b55283b385e5692ecf1b59332bbc5a11
|
363
|
+
- test/dummy/tmp/cache/assets/test/sprockets/b678ce3482f77c68a19e697960645cb6
|
364
|
+
- test/dummy/tmp/cache/assets/test/sprockets/ca9d9c205bcfa05de1ddd180f8ecc168
|
365
|
+
- test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
366
|
+
- test/dummy/tmp/cache/assets/test/sprockets/d36f675d4251ea3868635d299f3bb166
|
367
|
+
- test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
368
|
+
- test/dummy/tmp/cache/assets/test/sprockets/f56253b5f374fff1a33fbbc9881c9124
|
369
|
+
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
370
|
+
- test/dummy/tmp/cache/assets/test/sprockets/fe1f20fb032685e2e1fcad23f0ad6601
|
306
371
|
- test/test_helper.rb
|
307
372
|
- test/trust_test.rb
|
308
373
|
- test/unit/trust/active_model_test.rb
|