effective_roles 1.4.4 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +7 -34
- data/app/controllers/admin/roles_controller.rb +2 -3
- data/app/helpers/effective_roles_helper.rb +21 -39
- data/app/views/effective/roles/_summary.html.haml +6 -8
- data/config/routes.rb +4 -4
- data/lib/effective_roles.rb +16 -6
- data/lib/effective_roles/version.rb +1 -1
- metadata +3 -192
- data/Rakefile +0 -23
- data/app/views/effective/roles/_fields.html.haml +0 -17
- data/lib/tasks/effective_roles_tasks.rake +0 -4
- data/spec/dummy/README.rdoc +0 -10
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/models/post.rb +0 -3
- data/spec/dummy/app/models/user.rb +0 -3
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/config/application.rb +0 -58
- data/spec/dummy/config/boot.rb +0 -10
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -36
- data/spec/dummy/config/environments/production.rb +0 -67
- data/spec/dummy/config/environments/test.rb +0 -37
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/inflections.rb +0 -15
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/routes.rb +0 -58
- data/spec/dummy/db/schema.rb +0 -46
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/effective_roles_spec.rb +0 -147
- data/spec/models/acts_as_role_restricted_spec.rb +0 -218
- data/spec/spec_helper.rb +0 -40
- data/spec/support/factories.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b5041b2db41d9522772b70dc37c388b7a57e9c0
|
4
|
+
data.tar.gz: ea01182fa2ba7126f0cd565728e0d0d6baf66741
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 077e5eda1e614235919466f6dd16d6aed8a1e8d5ebc2882cf8a5654f8415a6fd543d476fd06b244e50bdf866aa4c7534f39a93d20a2adf5e2cb6b0e3c50ec4d6
|
7
|
+
data.tar.gz: a58d013d1779f351632cad1e6b60610decd6caa40ea413faad653d350996b5c9c2c343490e57ec8b3ef17c44f74e965c71b0815ca921afb1605d54b72b0d09a7
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -61,17 +61,6 @@ class AddRolesToPost < ActiveRecord::Migration
|
|
61
61
|
end
|
62
62
|
```
|
63
63
|
|
64
|
-
## Strong Parameters
|
65
|
-
|
66
|
-
Make your controller aware of the acts_as_role_restricted passed parameters:
|
67
|
-
|
68
|
-
```ruby
|
69
|
-
def permitted_params
|
70
|
-
params.require(:base_object).permit(:roles => [])
|
71
|
-
end
|
72
|
-
```
|
73
|
-
|
74
|
-
|
75
64
|
## Usage
|
76
65
|
|
77
66
|
### Defining Roles
|
@@ -178,37 +167,32 @@ before_filter :only => [:create, :update] do
|
|
178
167
|
end
|
179
168
|
```
|
180
169
|
|
181
|
-
|
182
170
|
## Form Helper
|
183
171
|
|
184
172
|
If you pass current_user (or any acts_as_role_restricted object) into these helpers, only the assignable_roles will be displayed.
|
185
173
|
|
186
|
-
###
|
174
|
+
### effective_form_with
|
187
175
|
|
188
176
|
```ruby
|
189
|
-
|
190
|
-
=
|
177
|
+
effective_form_with(model: @user) do |f|
|
178
|
+
= f.checks :roles, EffectiveRoles.roles_collection(f.object, current_user)
|
191
179
|
```
|
192
180
|
|
193
|
-
or
|
194
|
-
|
195
181
|
```ruby
|
196
|
-
|
197
|
-
=
|
182
|
+
effective_form_with(model: @user) do |f|
|
183
|
+
= f.radios :roles, EffectiveRoles.roles_collection(f.object, current_user)
|
198
184
|
```
|
199
185
|
|
200
186
|
### simple_form
|
201
187
|
|
202
188
|
```ruby
|
203
189
|
simple_form_for @user do |f|
|
204
|
-
= f.input :roles, :
|
190
|
+
= f.input :roles, collection: EffectiveRoles.roles_collection(f.object), as: :check_boxes
|
205
191
|
```
|
206
192
|
|
207
|
-
or
|
208
|
-
|
209
193
|
```ruby
|
210
194
|
simple_form_for @user do |f|
|
211
|
-
= f.input :roles, :
|
195
|
+
= f.input :roles, collection: EffectiveRoles.roles_collection(f.object, current_user), as: :check_boxes
|
212
196
|
```
|
213
197
|
|
214
198
|
### Strong Parameters
|
@@ -328,17 +312,6 @@ MIT License. Copyright [Code and Effect Inc.](http://www.codeandeffect.com/)
|
|
328
312
|
|
329
313
|
This model implements the https://github.com/ryanb/cancan/wiki/Role-Based-Authorization multi role based authorization based on the roles_mask field
|
330
314
|
|
331
|
-
## Testing
|
332
|
-
|
333
|
-
The test suite for this gem is unfortunately not yet complete.
|
334
|
-
|
335
|
-
Run tests by:
|
336
|
-
|
337
|
-
```ruby
|
338
|
-
rake spec
|
339
|
-
```
|
340
|
-
|
341
|
-
|
342
315
|
## Contributing
|
343
316
|
|
344
317
|
1. Fork it
|
@@ -1,13 +1,12 @@
|
|
1
1
|
module Admin
|
2
2
|
class RolesController < ApplicationController
|
3
|
-
|
3
|
+
before_action :authenticate_user!
|
4
4
|
|
5
5
|
layout (EffectiveRoles.layout.kind_of?(Hash) ? EffectiveRoles.layout[:admin_roles] : EffectiveRoles.layout)
|
6
6
|
|
7
7
|
def index
|
8
8
|
@page_title = 'Roles'
|
9
|
-
|
10
|
-
EffectiveRoles.authorized?(self, :admin, :effective_roles)
|
9
|
+
EffectiveRoles.authorize!(self, :admin, :effective_roles)
|
11
10
|
end
|
12
11
|
end
|
13
12
|
end
|
@@ -1,23 +1,11 @@
|
|
1
1
|
module EffectiveRolesHelper
|
2
|
-
# For use in formtastic forms
|
3
|
-
def effective_roles_fields(form, user = nil, options = {})
|
4
|
-
raise ArgumentError.new('EffectiveRoles config.role_descriptions must be a Hash. The Array syntax is deprecated.') unless EffectiveRoles.role_descriptions.kind_of?(Hash)
|
5
|
-
|
6
|
-
roles = EffectiveRoles.assignable_roles_for(user, form.object)
|
7
|
-
descriptions = EffectiveRoles.role_descriptions[form.object.class.name] || EffectiveRoles.role_descriptions || {}
|
8
|
-
|
9
|
-
opts = {:f => form, :roles => roles, :descriptions => descriptions}.merge(options)
|
10
|
-
|
11
|
-
render :partial => 'effective/roles/fields', :locals => opts
|
12
|
-
end
|
13
|
-
|
14
2
|
def effective_roles_summary(obj, options = {}) # User or a Post, any acts_as_roleable
|
15
3
|
raise 'expected an acts_as_roleable object' unless obj.respond_to?(:roles)
|
16
4
|
|
17
5
|
descriptions = EffectiveRoles.role_descriptions[obj.class.name] || EffectiveRoles.role_descriptions || {}
|
18
|
-
opts = {:
|
6
|
+
opts = { obj: obj, roles: obj.roles, descriptions: descriptions }.merge(options)
|
19
7
|
|
20
|
-
render :
|
8
|
+
render partial: 'effective/roles/summary', locals: opts
|
21
9
|
end
|
22
10
|
|
23
11
|
# Output a table of permissions for each role based on current permissions
|
@@ -33,17 +21,17 @@ module EffectiveRolesHelper
|
|
33
21
|
|
34
22
|
if opts[:only].present?
|
35
23
|
klasses = Array(opts[:only])
|
36
|
-
render partial: '/effective/roles/summary_table', locals: {klasses: klasses, roles: roles}
|
24
|
+
render partial: '/effective/roles/summary_table', locals: { klasses: klasses, roles: roles }
|
37
25
|
return
|
38
26
|
end
|
39
27
|
|
40
28
|
# Figure out all klasses (ActiveRecord objects)
|
41
29
|
Rails.application.eager_load!
|
42
|
-
tables = ActiveRecord::Base.connection.tables - ['schema_migrations', 'delayed_jobs']
|
30
|
+
tables = ActiveRecord::Base.connection.tables - ['schema_migrations', 'delayed_jobs', 'active_storage_attachments']
|
43
31
|
|
44
|
-
klasses = ActiveRecord::Base.descendants.
|
45
|
-
|
46
|
-
end
|
32
|
+
klasses = ActiveRecord::Base.descendants.select do |model|
|
33
|
+
(model.respond_to?(:table_name) && tables.include?(model.table_name))
|
34
|
+
end
|
47
35
|
|
48
36
|
if opts[:except]
|
49
37
|
klasses = klasses - Array(opts[:except])
|
@@ -71,35 +59,35 @@ module EffectiveRolesHelper
|
|
71
59
|
klasses = klasses + Array(opts[:additionally])
|
72
60
|
end
|
73
61
|
|
74
|
-
render partial: '/effective/roles/summary_table', locals: {klasses: klasses, roles: roles}
|
62
|
+
render partial: '/effective/roles/summary_table', locals: { klasses: klasses, roles: roles }
|
75
63
|
end
|
76
64
|
|
77
65
|
def effective_roles_authorization_badge(level)
|
78
66
|
case level
|
79
67
|
when :manage
|
80
|
-
content_tag(:span, 'Full', class: 'label label-primary')
|
68
|
+
content_tag(:span, 'Full', class: 'label label-primary badge badge-primary')
|
81
69
|
when :update
|
82
|
-
content_tag(:span, 'Edit', class: 'label label-success')
|
70
|
+
content_tag(:span, 'Edit', class: 'label label-success badge badge-success')
|
83
71
|
when :update_own
|
84
|
-
content_tag(:span, 'Edit Own', class: 'label label-info')
|
72
|
+
content_tag(:span, 'Edit Own', class: 'label label-info badge badge-info')
|
85
73
|
when :create
|
86
|
-
content_tag(:span, 'Create', class: 'label label-success')
|
74
|
+
content_tag(:span, 'Create', class: 'label label-success badge badge-success')
|
87
75
|
when :show
|
88
|
-
content_tag(:span, 'Read only', class: 'label label-warning')
|
76
|
+
content_tag(:span, 'Read only', class: 'label label-warning badge badge-warning')
|
89
77
|
when :index
|
90
|
-
content_tag(:span, 'Read only', class: 'label label-warning')
|
78
|
+
content_tag(:span, 'Read only', class: 'label label-warning badge badge-warning')
|
91
79
|
when :destroy
|
92
|
-
content_tag(:span, 'Delete only', class: 'label label-warning')
|
80
|
+
content_tag(:span, 'Delete only', class: 'label label-warning badge badge-warning')
|
93
81
|
when :none
|
94
|
-
content_tag(:span, 'No Access', class: 'label label-danger')
|
82
|
+
content_tag(:span, 'No Access', class: 'label label-danger badge badge-danger')
|
95
83
|
when :yes
|
96
|
-
content_tag(:span, 'Yes', class: 'label label-primary')
|
84
|
+
content_tag(:span, 'Yes', class: 'label label-primary badge badge-primary')
|
97
85
|
when :no
|
98
|
-
content_tag(:span, 'No', class: 'label label-danger')
|
86
|
+
content_tag(:span, 'No', class: 'label label-danger badge badge-danger')
|
99
87
|
when :unknown
|
100
|
-
content_tag(:span, 'Unknown', class: 'label')
|
88
|
+
content_tag(:span, 'Unknown', class: 'label badge')
|
101
89
|
else
|
102
|
-
content_tag(:span, level.to_s.titleize, class: 'label label-info')
|
90
|
+
content_tag(:span, level.to_s.titleize, class: 'label label-info badge badge-info')
|
103
91
|
end
|
104
92
|
end
|
105
93
|
|
@@ -108,13 +96,7 @@ module EffectiveRolesHelper
|
|
108
96
|
return "#{klass.keys.first} #{klass.values.first}" if klass.kind_of?(Hash) && klass.length == 1
|
109
97
|
|
110
98
|
klass = klass.keys.first if klass.kind_of?(Hash)
|
111
|
-
|
112
|
-
|
113
|
-
['Effective::Datatables::'].each do |replace|
|
114
|
-
label = label.sub(replace, '')
|
115
|
-
end
|
116
|
-
|
117
|
-
label
|
99
|
+
klass.respond_to?(:name) ? klass.name : klass.to_s
|
118
100
|
end
|
119
101
|
|
120
102
|
end
|
@@ -1,8 +1,6 @@
|
|
1
|
-
.
|
2
|
-
%
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
%p= role
|
8
|
-
%p.help-block= descriptions[role]
|
1
|
+
.form-group
|
2
|
+
%label.control-label Roles
|
3
|
+
- roles.each do |role|
|
4
|
+
.effective-role
|
5
|
+
= role
|
6
|
+
%p.text-muted.help-block= descriptions[role]
|
data/config/routes.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
Rails.application.routes.draw do
|
2
|
-
mount EffectiveRoles::Engine => '/', as: 'effective_roles'
|
3
|
-
end
|
4
|
-
|
5
1
|
EffectiveRoles::Engine.routes.draw do
|
6
2
|
namespace :admin do
|
7
3
|
resources :roles, only: [:index]
|
8
4
|
end
|
9
5
|
end
|
6
|
+
|
7
|
+
Rails.application.routes.draw do
|
8
|
+
mount EffectiveRoles::Engine => '/', as: 'effective_roles'
|
9
|
+
end
|
data/lib/effective_roles.rb
CHANGED
@@ -17,14 +17,24 @@ module EffectiveRoles
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def self.permitted_params
|
20
|
-
{roles: []}
|
20
|
+
{ roles: [] }
|
21
21
|
end
|
22
22
|
|
23
23
|
def self.authorized?(controller, action, resource)
|
24
|
-
if
|
25
|
-
|
24
|
+
@_exceptions ||= [Effective::AccessDenied, (CanCan::AccessDenied if defined?(CanCan)), (Pundit::NotAuthorizedError if defined?(Pundit))].compact
|
25
|
+
|
26
|
+
return !!authorization_method unless authorization_method.respond_to?(:call)
|
27
|
+
controller = controller.controller if controller.respond_to?(:controller)
|
28
|
+
|
29
|
+
begin
|
30
|
+
!!(controller || self).instance_exec((controller || self), action, resource, &authorization_method)
|
31
|
+
rescue *@_exceptions
|
32
|
+
false
|
26
33
|
end
|
27
|
-
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.authorize!(controller, action, resource)
|
37
|
+
raise Effective::AccessDenied unless authorized?(controller, action, resource)
|
28
38
|
end
|
29
39
|
|
30
40
|
# This method converts whatever is given into its roles
|
@@ -93,7 +103,7 @@ module EffectiveRoles
|
|
93
103
|
when :public
|
94
104
|
controller.instance_variable_set(:@current_user, nil)
|
95
105
|
|
96
|
-
if defined?(EffectiveLogging)
|
106
|
+
if defined?(EffectiveLogging)
|
97
107
|
EffectiveLogging.supressed { (controller.request.env['warden'].set_user(false) rescue nil) }
|
98
108
|
else
|
99
109
|
(controller.request.env['warden'].set_user(false) rescue nil)
|
@@ -108,7 +118,7 @@ module EffectiveRoles
|
|
108
118
|
# Restore the existing current_user stuff
|
109
119
|
if role == :public
|
110
120
|
ActiveRecord::Base.transaction do
|
111
|
-
if defined?(EffectiveLogging)
|
121
|
+
if defined?(EffectiveLogging)
|
112
122
|
EffectiveLogging.supressed { (controller.request.env['warden'].set_user(current_user) rescue nil) }
|
113
123
|
else
|
114
124
|
(controller.request.env['warden'].set_user(current_user) rescue nil)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_roles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,132 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.2.0
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: factory_girl_rails
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec-rails
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: shoulda-matchers
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: sqlite3
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: guard
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: guard-rspec
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: pry
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: pry-stack_explorer
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: pry-byebug
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
27
|
description: Assign multiple roles to any User or other ActiveRecord object. Select
|
154
28
|
only the appropriate objects based on intelligent, chainable ActiveRecord::Relation
|
155
29
|
finder methods.
|
@@ -161,13 +35,11 @@ extra_rdoc_files: []
|
|
161
35
|
files:
|
162
36
|
- MIT-LICENSE
|
163
37
|
- README.md
|
164
|
-
- Rakefile
|
165
38
|
- app/controllers/admin/roles_controller.rb
|
166
39
|
- app/helpers/effective_roles_helper.rb
|
167
40
|
- app/models/concerns/acts_as_role_restricted.rb
|
168
41
|
- app/models/effective/access_denied.rb
|
169
42
|
- app/views/admin/roles/index.html.haml
|
170
|
-
- app/views/effective/roles/_fields.html.haml
|
171
43
|
- app/views/effective/roles/_summary.html.haml
|
172
44
|
- app/views/effective/roles/_summary_table.html.haml
|
173
45
|
- config/effective_roles.rb
|
@@ -176,37 +48,6 @@ files:
|
|
176
48
|
- lib/effective_roles/engine.rb
|
177
49
|
- lib/effective_roles/version.rb
|
178
50
|
- lib/generators/effective_roles/install_generator.rb
|
179
|
-
- lib/tasks/effective_roles_tasks.rake
|
180
|
-
- spec/dummy/README.rdoc
|
181
|
-
- spec/dummy/Rakefile
|
182
|
-
- spec/dummy/app/assets/javascripts/application.js
|
183
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
184
|
-
- spec/dummy/app/controllers/application_controller.rb
|
185
|
-
- spec/dummy/app/helpers/application_helper.rb
|
186
|
-
- spec/dummy/app/models/post.rb
|
187
|
-
- spec/dummy/app/models/user.rb
|
188
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
189
|
-
- spec/dummy/config.ru
|
190
|
-
- spec/dummy/config/application.rb
|
191
|
-
- spec/dummy/config/boot.rb
|
192
|
-
- spec/dummy/config/database.yml
|
193
|
-
- spec/dummy/config/environment.rb
|
194
|
-
- spec/dummy/config/environments/development.rb
|
195
|
-
- spec/dummy/config/environments/production.rb
|
196
|
-
- spec/dummy/config/environments/test.rb
|
197
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
198
|
-
- spec/dummy/config/initializers/inflections.rb
|
199
|
-
- spec/dummy/config/initializers/mime_types.rb
|
200
|
-
- spec/dummy/config/initializers/secret_token.rb
|
201
|
-
- spec/dummy/config/initializers/session_store.rb
|
202
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
203
|
-
- spec/dummy/config/routes.rb
|
204
|
-
- spec/dummy/db/schema.rb
|
205
|
-
- spec/dummy/db/test.sqlite3
|
206
|
-
- spec/effective_roles_spec.rb
|
207
|
-
- spec/models/acts_as_role_restricted_spec.rb
|
208
|
-
- spec/spec_helper.rb
|
209
|
-
- spec/support/factories.rb
|
210
51
|
homepage: https://github.com/code-and-effect/effective_roles
|
211
52
|
licenses:
|
212
53
|
- MIT
|
@@ -233,34 +74,4 @@ specification_version: 4
|
|
233
74
|
summary: Assign multiple roles to any User or other ActiveRecord object. Select only
|
234
75
|
the appropriate objects based on intelligent, chainable ActiveRecord::Relation finder
|
235
76
|
methods.
|
236
|
-
test_files:
|
237
|
-
- spec/dummy/app/assets/javascripts/application.js
|
238
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
239
|
-
- spec/dummy/app/controllers/application_controller.rb
|
240
|
-
- spec/dummy/app/helpers/application_helper.rb
|
241
|
-
- spec/dummy/app/models/post.rb
|
242
|
-
- spec/dummy/app/models/user.rb
|
243
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
244
|
-
- spec/dummy/config/application.rb
|
245
|
-
- spec/dummy/config/boot.rb
|
246
|
-
- spec/dummy/config/database.yml
|
247
|
-
- spec/dummy/config/environment.rb
|
248
|
-
- spec/dummy/config/environments/development.rb
|
249
|
-
- spec/dummy/config/environments/production.rb
|
250
|
-
- spec/dummy/config/environments/test.rb
|
251
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
252
|
-
- spec/dummy/config/initializers/inflections.rb
|
253
|
-
- spec/dummy/config/initializers/mime_types.rb
|
254
|
-
- spec/dummy/config/initializers/secret_token.rb
|
255
|
-
- spec/dummy/config/initializers/session_store.rb
|
256
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
257
|
-
- spec/dummy/config/routes.rb
|
258
|
-
- spec/dummy/config.ru
|
259
|
-
- spec/dummy/db/schema.rb
|
260
|
-
- spec/dummy/db/test.sqlite3
|
261
|
-
- spec/dummy/Rakefile
|
262
|
-
- spec/dummy/README.rdoc
|
263
|
-
- spec/effective_roles_spec.rb
|
264
|
-
- spec/models/acts_as_role_restricted_spec.rb
|
265
|
-
- spec/spec_helper.rb
|
266
|
-
- spec/support/factories.rb
|
77
|
+
test_files: []
|