ixtlan-guard 0.1.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/lib/generators/active_record/templates/flavor_migration.rb +13 -0
- data/lib/generators/active_record/templates/flavor_model.rb +8 -0
- data/lib/generators/active_record/templates/group_model.rb +43 -0
- data/lib/generators/active_record/templates/group_user_migration.rb +13 -0
- data/lib/generators/active_record/templates/user_model.rb +124 -0
- data/lib/generators/active_record/user_management_models_generator.rb +202 -0
- data/lib/generators/erb/user_management_controller_generator.rb +10 -0
- data/lib/generators/{ixtlan → guard}/controller/USAGE +0 -0
- data/lib/generators/{ixtlan → guard}/controller/controller_generator.rb +2 -2
- data/lib/generators/{ixtlan → guard}/scaffold/USAGE +0 -0
- data/lib/generators/{ixtlan → guard}/scaffold/scaffold_generator.rb +4 -6
- data/lib/generators/guard/scaffold/templates/guard.rb +20 -0
- data/lib/generators/guard/templates/guard.rb +20 -0
- data/lib/generators/ixtlan/maintenance_scaffold/USAGE +8 -0
- data/lib/generators/ixtlan/maintenance_scaffold/maintenance_scaffold_generator.rb +40 -0
- data/lib/generators/ixtlan/permissions_scaffold/USAGE +8 -0
- data/lib/generators/ixtlan/permissions_scaffold/permissions_scaffold_generator.rb +33 -0
- data/lib/generators/ixtlan/user_management_controller/USAGE +8 -0
- data/lib/generators/ixtlan/user_management_controller/user_management_controller_generator.rb +23 -0
- data/lib/generators/ixtlan/user_management_models/USAGE +8 -0
- data/lib/generators/ixtlan/user_management_models/user_management_models_generator.rb +19 -0
- data/lib/generators/ixtlan/user_management_scaffold/user_management_scaffold_generator.rb +13 -0
- data/lib/ixtlan-guard.rb +2 -2
- data/lib/ixtlan/guard.rb +1 -159
- data/lib/ixtlan/guard/controllers/maintenance_controller.rb +45 -0
- data/lib/ixtlan/guard/controllers/permissions_controller.rb +41 -0
- data/lib/ixtlan/guard/guard.rb +245 -0
- data/lib/ixtlan/guard/models/maintenance.rb +55 -0
- data/lib/ixtlan/guard/models/user_update_manager.rb +95 -0
- data/lib/ixtlan/guard/rails_integration.rb +88 -0
- data/lib/ixtlan/guard/railtie.rb +33 -0
- data/lib/ixtlan/guard/spec/user_management_models_spec.rb +193 -0
- data/spec/guard_spec.rb +48 -12
- data/spec/railtie_spec.rb +1 -1
- metadata +75 -52
- data/lib/generators/ixtlan/templates/edit.html.erb +0 -10
- data/lib/generators/ixtlan/templates/guard.rb +0 -13
- data/lib/generators/ixtlan/templates/index.html.erb +0 -35
- data/lib/generators/ixtlan/templates/new.html.erb +0 -7
- data/lib/generators/ixtlan/templates/show.html.erb +0 -16
- data/lib/generators/scaffold/scaffold/scaffold_generator.rb +0 -23
- data/lib/ixtlan/guard_railtie.rb +0 -43
- data/lib/ixtlan/rails_integration.rb +0 -55
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'rails'
|
2
|
+
require 'ixtlan/guard'
|
3
|
+
require 'logger'
|
4
|
+
|
5
|
+
module Ixtlan
|
6
|
+
module Guard
|
7
|
+
class Railtie < Rails::Railtie
|
8
|
+
|
9
|
+
config.before_configuration do |app|
|
10
|
+
app.config.guard =
|
11
|
+
Ixtlan::Guard::Guard.new(:guard_dir => File.join(Rails.root, "app", "guards"))
|
12
|
+
end
|
13
|
+
|
14
|
+
config.after_initialize do |app|
|
15
|
+
logger = app.config.logger || Rails.logger || Logger.new(STDERR)
|
16
|
+
app.config.guard.logger = logger unless defined?(Slf4r)
|
17
|
+
begin
|
18
|
+
app.config.guard.setup
|
19
|
+
rescue Ixtlan::Guard::GuardException => e
|
20
|
+
logger.warn e.message
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
config.generators do
|
25
|
+
require 'rails/generators'
|
26
|
+
require 'rails/generators/rails/controller/controller_generator'
|
27
|
+
Rails::Generators::ControllerGenerator.hook_for :guard, :type => :boolean, :default => true do |controller|
|
28
|
+
invoke controller, [ class_name, actions ]
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,193 @@
|
|
1
|
+
shared_examples_for 'integration-test' do
|
2
|
+
|
3
|
+
describe "UserManagementModels" do
|
4
|
+
|
5
|
+
before :all do
|
6
|
+
@root = Group.find_by_name(Group::ROOT) || Group.create(:name => Group::ROOT)
|
7
|
+
@admin = Group.find_by_name(Group::ADMIN) || Group.create(:name => Group::ADMIN)
|
8
|
+
@translator = Group.find_by_name("translator") || Group.create(:name => "translator")
|
9
|
+
@superuser = User.find_by_id(1)
|
10
|
+
if @superuser.nil? || @superuser.groups == []
|
11
|
+
@superuser = User.create!
|
12
|
+
@superuser.groups << @root
|
13
|
+
@superuser.save!
|
14
|
+
end
|
15
|
+
@main = Domain.find_by_name('main') || Domain.create(:name => 'main')
|
16
|
+
@sub = Domain.find_by_name('sub') || Domain.create(:name => 'sub')
|
17
|
+
DomainsGroupsUser.delete_all
|
18
|
+
@adminuser = User.new('group_ids' => [@admin.id])
|
19
|
+
@adminuser.current_user = @superuser
|
20
|
+
@adminuser.save
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "root user" do
|
24
|
+
it 'should create user' do
|
25
|
+
@adminuser.id.should_not be_nil
|
26
|
+
@adminuser.groups.should == [@admin]
|
27
|
+
@adminuser.domains_for_group(@admin).should == []
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should add domain to user via update' do
|
31
|
+
@adminuser.domains_for_group(@admin).member?(@main).should be_false
|
32
|
+
@adminuser.current_user = @superuser
|
33
|
+
@adminuser.update_attributes(Group::ADMIN => { 'domain_ids' => [@main.id.to_s] }, 'group_ids' => [@admin.id.to_s])
|
34
|
+
@adminuser.domains_for_group(@admin).member?(@main).should be_true
|
35
|
+
@adminuser.current_user.should be_nil
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'should raise error when adding a domain without current_user set' do
|
39
|
+
@adminuser.current_user = nil
|
40
|
+
lambda { @adminuser.update_attributes(Group::ADMIN => { 'domain_ids' => [@sub.id.to_s] }, 'group_ids' => [@admin.id.to_s]) }.should raise_error
|
41
|
+
@adminuser.current_user.should be_nil
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'should add new group through update' do
|
45
|
+
@adminuser.groups.member?(@translator).should be_false
|
46
|
+
@adminuser.current_user = @superuser
|
47
|
+
@adminuser.update_attributes('group_ids' => [@translator.id.to_s])
|
48
|
+
@adminuser.groups.member?(@translator).should be_true
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'should raise error when adding new group' do
|
52
|
+
@adminuser.groups.member?(@root).should be_false
|
53
|
+
@adminuser.current_user = nil
|
54
|
+
lambda{ @adminuser.update_attributes('group_ids' => [@translator.id.to_s])}.should raise_error
|
55
|
+
@adminuser.current_user.should be_nil
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe "admin user" do
|
60
|
+
|
61
|
+
before :all do
|
62
|
+
@locales = Group.find_by_name("locales") || Group.create(:name => "locales")
|
63
|
+
@adminuser.current_user = @superuser
|
64
|
+
@adminuser.update_attributes('group_ids' => [@admin.id.to_s, @locales.id.to_s], Group::ADMIN => {"domain_ids" => [@main.id.to_s]})
|
65
|
+
@adminuser.save
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'should create new users' do
|
69
|
+
user = User.new('group_ids' => [@admin.id.to_s])
|
70
|
+
user.current_user = @adminuser
|
71
|
+
user.save.should be_true
|
72
|
+
user.groups.member?(@admin).should be_true
|
73
|
+
user.groups.size.should == 1
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'should not add group via update_attributes which admin does not belong to' do
|
77
|
+
user = User.create({:current_user => @adminuser, 'group_ids' => [@root.id.to_s]})
|
78
|
+
user.id.should_not be_nil
|
79
|
+
|
80
|
+
user.groups.member?(@root).should be_false
|
81
|
+
user.groups.size.should == 0
|
82
|
+
end
|
83
|
+
|
84
|
+
it 'should not add group via update_attributes which admin does not belong to' do
|
85
|
+
user = User.create(:current_user => @adminuser)
|
86
|
+
user.id.should_not be_nil
|
87
|
+
|
88
|
+
user.current_user = @adminuser
|
89
|
+
user.update_attributes('group_ids' => [@root.id.to_s]).should be_true
|
90
|
+
|
91
|
+
user.groups.member?(@root).should be_false
|
92
|
+
user.groups.size.should == 0
|
93
|
+
end
|
94
|
+
|
95
|
+
it 'should be able to delete only groups belonging to admin, leave others alone' do
|
96
|
+
user = User.create(:current_user => @superuser, 'group_ids' => [@translator.id.to_s])
|
97
|
+
user.groups.member?(@translator).should be_true
|
98
|
+
|
99
|
+
user.current_user = @adminuser
|
100
|
+
user.update_attributes('group_ids' => []).should be_true
|
101
|
+
|
102
|
+
user.groups.member?(@translator).should be_true
|
103
|
+
user.groups.size.should == 1
|
104
|
+
end
|
105
|
+
|
106
|
+
it 'should be able to add and delete groups belonging to admin' do
|
107
|
+
user = User.create(:current_user => @superuser, 'group_ids' => [@translator.id.to_s])
|
108
|
+
user.id.should_not be_nil
|
109
|
+
user.groups.member?(@translator).should be_true
|
110
|
+
|
111
|
+
user.current_user = @adminuser
|
112
|
+
user.update_attributes('group_ids' => [@admin.id.to_s, @locales.id.to_s]).should be_true
|
113
|
+
|
114
|
+
user.groups.member?(@translator).should be_true
|
115
|
+
user.groups.size.should == 3
|
116
|
+
|
117
|
+
user.current_user = @adminuser
|
118
|
+
user.update_attributes('group_ids' => [@locales.id.to_s]).should be_true
|
119
|
+
|
120
|
+
user.groups.member?(@locales).should be_true
|
121
|
+
user.groups.member?(@translator).should be_true
|
122
|
+
user.groups.size.should == 2
|
123
|
+
end
|
124
|
+
|
125
|
+
it 'should create new users with domains' do
|
126
|
+
# first create to have an ID
|
127
|
+
user = User.create(:current_user => @adminuser)
|
128
|
+
user.id.should_not be_nil
|
129
|
+
# then add the domain
|
130
|
+
user.update_attributes(:current_user => @adminuser, 'group_ids' => [@admin.id.to_s], "admin" => {"domain_ids" => [@main.id.to_s] })
|
131
|
+
|
132
|
+
user.groups.member?(@admin).should be_true
|
133
|
+
user.groups.size.should == 1
|
134
|
+
|
135
|
+
user.domains_for_group(@admin).member?(@main).should be_true
|
136
|
+
user.domains_for_group(@admin).size.should == 1
|
137
|
+
end
|
138
|
+
|
139
|
+
it 'should add only domains which belongs to admin' do
|
140
|
+
# first create to have an ID
|
141
|
+
user = User.create(:current_user => @adminuser, 'group_ids' => [@admin.id.to_s])
|
142
|
+
user.id.should_not be_nil
|
143
|
+
# then add the domain
|
144
|
+
user.update_attributes(:current_user => @adminuser, 'group_ids' => [@admin.id.to_s], "admin" => {"domain_ids" => [@main.id.to_s, @sub.id.to_s] })
|
145
|
+
|
146
|
+
user.groups.member?(@admin).should be_true
|
147
|
+
user.groups.size.should == 1
|
148
|
+
|
149
|
+
user.domains_for_group(@admin).member?(@main).should be_true
|
150
|
+
user.domains_for_group(@admin).size.should == 1
|
151
|
+
end
|
152
|
+
|
153
|
+
it 'should add only domains belonging to the admin' do
|
154
|
+
# first create to have an ID
|
155
|
+
user = User.create(:current_user => @adminuser, 'group_ids' => [@admin.id.to_s])
|
156
|
+
user.id.should_not be_nil
|
157
|
+
# then add the domain
|
158
|
+
user.update_attributes(:current_user => @adminuser, 'group_ids' => [@admin.id.to_s], "admin" => {"domain_ids" => [@main.id.to_s, @sub.id.to_s] })
|
159
|
+
|
160
|
+
user.groups.member?(@admin).should be_true
|
161
|
+
user.groups.size.should == 1
|
162
|
+
|
163
|
+
user.domains_for_group(@admin).member?(@main).should be_true
|
164
|
+
user.domains_for_group(@admin).size.should == 1
|
165
|
+
|
166
|
+
user.update_attributes(:current_user => @adminuser, 'group_ids' => [@admin.id.to_s], "admin" => {"domain_ids" => [] })
|
167
|
+
user.domains_for_group(@admin).size.should == 0
|
168
|
+
end
|
169
|
+
|
170
|
+
it 'should delete only domains belonging to the admin' do
|
171
|
+
# first create to have an ID
|
172
|
+
user = User.create(:current_user => @adminuser, 'group_ids' => [@admin.id.to_s])
|
173
|
+
user.id.should_not be_nil
|
174
|
+
# then add the domain
|
175
|
+
user.update_attributes(:current_user => @superuser, 'group_ids' => [@admin.id.to_s], "admin" => {"domain_ids" => [@main.id.to_s, @sub.id.to_s] })
|
176
|
+
|
177
|
+
user.groups.member?(@admin).should be_true
|
178
|
+
user.groups.size.should == 1
|
179
|
+
|
180
|
+
user.domains_for_group(@admin).member?(@main).should be_true
|
181
|
+
user.domains_for_group(@admin).member?(@sub).should be_true
|
182
|
+
user.domains_for_group(@admin).size.should == 2
|
183
|
+
|
184
|
+
user.update_attributes(:current_user => @adminuser, 'group_ids' => [@admin.id.to_s], "admin" => {"domain_ids" => [] })
|
185
|
+
|
186
|
+
user.domains_for_group(@admin).member?(@main).should be_false
|
187
|
+
user.domains_for_group(@admin).member?(@sub).should be_true
|
188
|
+
user.domains_for_group(@admin).size.should == 1
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
data/spec/guard_spec.rb
CHANGED
@@ -4,15 +4,23 @@ require 'ixtlan/guard'
|
|
4
4
|
describe Ixtlan::Guard do
|
5
5
|
|
6
6
|
before :all do
|
7
|
-
@guard = Ixtlan::Guard.new(
|
8
|
-
:root,
|
9
|
-
File.join(File.dirname(__FILE__), "guards") )
|
7
|
+
@guard = Ixtlan::Guard::Guard.new(:guard_dir => File.join(File.dirname(__FILE__), "guards") )
|
10
8
|
|
11
9
|
@guard.setup
|
12
10
|
@current_user = Object.new
|
13
11
|
def @current_user.groups(g = nil)
|
14
|
-
|
15
|
-
|
12
|
+
if g
|
13
|
+
@groups = g.collect do |gg|
|
14
|
+
group = Object.new
|
15
|
+
def group.name(name =nil)
|
16
|
+
@name = name if name
|
17
|
+
@name
|
18
|
+
end
|
19
|
+
group.name(gg)
|
20
|
+
group
|
21
|
+
end
|
22
|
+
end
|
23
|
+
@groups || []
|
16
24
|
end
|
17
25
|
|
18
26
|
@controller = Object.new
|
@@ -24,20 +32,18 @@ describe Ixtlan::Guard do
|
|
24
32
|
end
|
25
33
|
|
26
34
|
it 'should fail with missing guard dir' do
|
27
|
-
lambda {Ixtlan::Guard.new(
|
28
|
-
:root,
|
29
|
-
"does_not_exists").setup }.should raise_error(Ixtlan::GuardException)
|
35
|
+
lambda {Ixtlan::Guard::Guard.new(:guard_dir => "does_not_exists").setup }.should raise_error(Ixtlan::Guard::GuardException)
|
30
36
|
end
|
31
37
|
|
32
38
|
it 'should initialize' do
|
33
39
|
@guard.should_not be_nil
|
34
40
|
end
|
35
41
|
|
36
|
-
it 'should
|
42
|
+
it 'should fail check without current user' do
|
37
43
|
controller = Object.new
|
38
44
|
def controller.current_user
|
39
45
|
end
|
40
|
-
@guard.check(controller, :none, :something).should
|
46
|
+
@guard.check(controller, :none, :something).should be_false
|
41
47
|
end
|
42
48
|
|
43
49
|
it 'should pass check with user being root' do
|
@@ -65,6 +71,36 @@ describe Ixtlan::Guard do
|
|
65
71
|
@guard.check(@controller, :users, :update).should be_true
|
66
72
|
end
|
67
73
|
|
74
|
+
it 'should not pass check with user when in blocked group' do
|
75
|
+
@current_user.groups([:users])
|
76
|
+
@guard.block_groups([:users])
|
77
|
+
begin
|
78
|
+
@guard.check(@controller, :users, :update).should be_false
|
79
|
+
ensure
|
80
|
+
@guard.block_groups([])
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
it 'should pass check with user when not in blocked group' do
|
85
|
+
@current_user.groups([:users])
|
86
|
+
@guard.block_groups([:accounts])
|
87
|
+
begin
|
88
|
+
@guard.check(@controller, :users, :update).should be_true
|
89
|
+
ensure
|
90
|
+
@guard.block_groups([])
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
it 'should pass check with root-user when not in blocked group' do
|
95
|
+
@current_user.groups([:root])
|
96
|
+
@guard.block_groups([:root])
|
97
|
+
begin
|
98
|
+
@guard.check(@controller, :users, :update).should be_true
|
99
|
+
ensure
|
100
|
+
@guard.block_groups([])
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
68
104
|
it 'should not pass check with user' do
|
69
105
|
@current_user.groups([:accounts])
|
70
106
|
@guard.check(@controller, :users, :update).should be_false
|
@@ -85,10 +121,10 @@ describe Ixtlan::Guard do
|
|
85
121
|
end
|
86
122
|
|
87
123
|
it 'should raise exception on unknown action' do
|
88
|
-
lambda {@guard.check(@controller, :users, :unknown_action) }.should raise_error(Ixtlan::GuardException)
|
124
|
+
lambda {@guard.check(@controller, :users, :unknown_action) }.should raise_error(Ixtlan::Guard::GuardException)
|
89
125
|
end
|
90
126
|
|
91
127
|
it 'should raise exception on unknown resource' do
|
92
|
-
lambda {@guard.check(@controller, :unknown_resource, :update) }.should raise_error(Ixtlan::GuardException)
|
128
|
+
lambda {@guard.check(@controller, :unknown_resource, :update) }.should raise_error(Ixtlan::Guard::GuardException)
|
93
129
|
end
|
94
130
|
end
|
data/spec/railtie_spec.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require 'ixtlan/
|
2
|
+
require 'ixtlan/guard/railtie'
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ixtlan-guard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
version: 0.1.0
|
4
|
+
prerelease:
|
5
|
+
version: 0.4.0
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- mkristian
|
@@ -14,65 +10,75 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date:
|
13
|
+
date: 2011-07-23 00:00:00 +05:30
|
18
14
|
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
21
|
-
name:
|
17
|
+
name: ixtlan-core
|
22
18
|
prerelease: false
|
23
19
|
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
24
21
|
requirements:
|
25
22
|
- - "="
|
26
23
|
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
|
29
|
-
- 0
|
30
|
-
- 0
|
31
|
-
version: 3.0.0
|
32
|
-
type: :development
|
24
|
+
version: 0.4.0
|
25
|
+
type: :runtime
|
33
26
|
version_requirements: *id001
|
34
27
|
- !ruby/object:Gem::Dependency
|
35
|
-
name:
|
28
|
+
name: rails
|
36
29
|
prerelease: false
|
37
30
|
requirement: &id002 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
38
32
|
requirements:
|
39
33
|
- - "="
|
40
34
|
- !ruby/object:Gem::Version
|
41
|
-
|
42
|
-
- 1
|
43
|
-
- 3
|
44
|
-
- 1
|
45
|
-
version: 1.3.1
|
35
|
+
version: 3.0.9
|
46
36
|
type: :development
|
47
37
|
version_requirements: *id002
|
48
38
|
- !ruby/object:Gem::Dependency
|
49
|
-
name:
|
39
|
+
name: rspec
|
50
40
|
prerelease: false
|
51
41
|
requirement: &id003 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
52
43
|
requirements:
|
53
44
|
- - "="
|
54
45
|
- !ruby/object:Gem::Version
|
55
|
-
|
56
|
-
- 0
|
57
|
-
- 9
|
58
|
-
- 2
|
59
|
-
version: 0.9.2
|
46
|
+
version: 2.6.0
|
60
47
|
type: :development
|
61
48
|
version_requirements: *id003
|
62
49
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
50
|
+
name: cucumber
|
64
51
|
prerelease: false
|
65
52
|
requirement: &id004 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
66
54
|
requirements:
|
67
55
|
- - "="
|
68
56
|
- !ruby/object:Gem::Version
|
69
|
-
|
70
|
-
- 0
|
71
|
-
- 8
|
72
|
-
- 7
|
73
|
-
version: 0.8.7
|
57
|
+
version: 0.9.4
|
74
58
|
type: :development
|
75
59
|
version_requirements: *id004
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: rake
|
62
|
+
prerelease: false
|
63
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - "="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.8.7
|
69
|
+
type: :development
|
70
|
+
version_requirements: *id005
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: ruby-maven
|
73
|
+
prerelease: false
|
74
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - "="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 0.8.3.0.3.0.28.3
|
80
|
+
type: :development
|
81
|
+
version_requirements: *id006
|
76
82
|
description: simple authorization framework for rails controllers
|
77
83
|
email:
|
78
84
|
- m.kristian@web.de
|
@@ -83,28 +89,47 @@ extensions: []
|
|
83
89
|
extra_rdoc_files: []
|
84
90
|
|
85
91
|
files:
|
92
|
+
- MIT-LICENSE
|
86
93
|
- lib/ixtlan-guard.rb
|
87
|
-
- lib/generators/
|
88
|
-
- lib/generators/
|
89
|
-
- lib/generators/
|
90
|
-
- lib/generators/
|
91
|
-
- lib/generators/
|
92
|
-
- lib/generators/
|
93
|
-
- lib/generators/
|
94
|
-
- lib/generators/ixtlan/
|
95
|
-
- lib/generators/ixtlan/
|
96
|
-
- lib/generators/ixtlan/
|
97
|
-
- lib/ixtlan/
|
98
|
-
- lib/ixtlan/
|
94
|
+
- lib/generators/erb/user_management_controller_generator.rb
|
95
|
+
- lib/generators/guard/controller/USAGE
|
96
|
+
- lib/generators/guard/controller/controller_generator.rb
|
97
|
+
- lib/generators/guard/scaffold/USAGE
|
98
|
+
- lib/generators/guard/scaffold/scaffold_generator.rb
|
99
|
+
- lib/generators/guard/scaffold/templates/guard.rb
|
100
|
+
- lib/generators/guard/templates/guard.rb
|
101
|
+
- lib/generators/ixtlan/user_management_scaffold/user_management_scaffold_generator.rb
|
102
|
+
- lib/generators/ixtlan/user_management_controller/USAGE
|
103
|
+
- lib/generators/ixtlan/user_management_controller/user_management_controller_generator.rb
|
104
|
+
- lib/generators/ixtlan/maintenance_scaffold/USAGE
|
105
|
+
- lib/generators/ixtlan/maintenance_scaffold/maintenance_scaffold_generator.rb
|
106
|
+
- lib/generators/ixtlan/permissions_scaffold/USAGE
|
107
|
+
- lib/generators/ixtlan/permissions_scaffold/permissions_scaffold_generator.rb
|
108
|
+
- lib/generators/ixtlan/user_management_models/user_management_models_generator.rb
|
109
|
+
- lib/generators/ixtlan/user_management_models/USAGE
|
110
|
+
- lib/generators/active_record/user_management_models_generator.rb
|
111
|
+
- lib/generators/active_record/templates/user_model.rb
|
112
|
+
- lib/generators/active_record/templates/group_model.rb
|
113
|
+
- lib/generators/active_record/templates/flavor_migration.rb
|
114
|
+
- lib/generators/active_record/templates/group_user_migration.rb
|
115
|
+
- lib/generators/active_record/templates/flavor_model.rb
|
99
116
|
- lib/ixtlan/guard.rb
|
100
|
-
-
|
117
|
+
- lib/ixtlan/guard/rails_integration.rb
|
118
|
+
- lib/ixtlan/guard/guard.rb
|
119
|
+
- lib/ixtlan/guard/railtie.rb
|
120
|
+
- lib/ixtlan/guard/controllers/maintenance_controller.rb
|
121
|
+
- lib/ixtlan/guard/controllers/permissions_controller.rb
|
122
|
+
- lib/ixtlan/guard/spec/user_management_models_spec.rb
|
123
|
+
- lib/ixtlan/guard/models/maintenance.rb
|
124
|
+
- lib/ixtlan/guard/models/user_update_manager.rb
|
101
125
|
- spec/spec_helper.rb
|
126
|
+
- spec/guard_spec.rb
|
102
127
|
- spec/railtie_spec.rb
|
103
128
|
- spec/guards/users_guard.rb
|
104
129
|
has_rdoc: true
|
105
130
|
homepage: http://github.com/mkristian/ixtlan-guard
|
106
|
-
licenses:
|
107
|
-
|
131
|
+
licenses:
|
132
|
+
- MIT-LICENSE
|
108
133
|
post_install_message:
|
109
134
|
rdoc_options:
|
110
135
|
- --main
|
@@ -112,23 +137,21 @@ rdoc_options:
|
|
112
137
|
require_paths:
|
113
138
|
- lib
|
114
139
|
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
none: false
|
115
141
|
requirements:
|
116
142
|
- - ">="
|
117
143
|
- !ruby/object:Gem::Version
|
118
|
-
segments:
|
119
|
-
- 0
|
120
144
|
version: "0"
|
121
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
|
+
none: false
|
122
147
|
requirements:
|
123
148
|
- - ">="
|
124
149
|
- !ruby/object:Gem::Version
|
125
|
-
segments:
|
126
|
-
- 0
|
127
150
|
version: "0"
|
128
151
|
requirements: []
|
129
152
|
|
130
153
|
rubyforge_project:
|
131
|
-
rubygems_version: 1.
|
154
|
+
rubygems_version: 1.5.1
|
132
155
|
signing_key:
|
133
156
|
specification_version: 3
|
134
157
|
summary: guard your controller actions
|