lockdown 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +1 -1
- data/README.txt +5 -5
- data/lib/lockdown/controller.rb +12 -4
- data/lib/lockdown/version.rb +1 -1
- data/rails_generators/lockdown/lockdown_generator.rb +2 -2
- data/rails_generators/lockdown/templates/db/migrate/{create_admin_user_and_user_group.rb → create_admin_user.rb} +1 -1
- data/website/generator.html +1 -1
- data/website/index.html +1 -1
- metadata +3 -3
data/History.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
== 0.5.8 2008-06-17
|
2
|
+
* Fixed: External links are no longer restricted by link_to security.
|
3
|
+
* Modified: Name of migration that adds admin user.
|
4
|
+
|
1
5
|
== 0.5.7 2008-06-13
|
2
6
|
* Fixed: Change password template, removed ajax usage. Issue: http://stonean.com/issues/show/5
|
3
7
|
|
data/Manifest.txt
CHANGED
@@ -49,7 +49,7 @@ rails_generators/lockdown/templates/app/views/users/edit.html.erb
|
|
49
49
|
rails_generators/lockdown/templates/app/views/users/index.html.erb
|
50
50
|
rails_generators/lockdown/templates/app/views/users/new.html.erb
|
51
51
|
rails_generators/lockdown/templates/app/views/users/show.html.erb
|
52
|
-
rails_generators/lockdown/templates/db/migrate/
|
52
|
+
rails_generators/lockdown/templates/db/migrate/create_admin_user.rb
|
53
53
|
rails_generators/lockdown/templates/db/migrate/create_permissions.rb
|
54
54
|
rails_generators/lockdown/templates/db/migrate/create_profiles.rb
|
55
55
|
rails_generators/lockdown/templates/db/migrate/create_user_groups.rb
|
data/README.txt
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
= lockdown
|
2
2
|
|
3
|
-
http://lockdown
|
3
|
+
http://stonean.com/wiki/lockdown
|
4
4
|
|
5
5
|
== DESCRIPTION:
|
6
6
|
|
7
|
-
Lockdown is a authentication/authorization system for RubyOnRails
|
7
|
+
Lockdown is a authentication/authorization system for RubyOnRails. (Merb compatibility coming soon).
|
8
8
|
|
9
|
-
For more information please visit
|
9
|
+
For more information please visit stonean.com
|
10
10
|
|
11
11
|
== REQUIREMENTS:
|
12
12
|
|
13
13
|
Lockdown currently supports:
|
14
14
|
|
15
|
-
Frameworks: RubyOnRails
|
15
|
+
Frameworks: RubyOnRails
|
16
16
|
|
17
|
-
ORMs: ActiveRecord
|
17
|
+
ORMs: ActiveRecord
|
18
18
|
|
19
19
|
== INSTALL:
|
20
20
|
|
data/lib/lockdown/controller.rb
CHANGED
@@ -185,13 +185,17 @@ module Lockdown
|
|
185
185
|
# continue on
|
186
186
|
end
|
187
187
|
|
188
|
+
# Passing in different domain
|
189
|
+
return true if remote_url?(url_parts[2])
|
190
|
+
|
188
191
|
false
|
189
192
|
end
|
190
193
|
|
191
194
|
def access_denied(e)
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
+
if Lockdown::System.fetch(:logout_on_access_violation)
|
196
|
+
reset_session
|
197
|
+
end
|
198
|
+
|
195
199
|
respond_to do |accepts|
|
196
200
|
accepts.html do
|
197
201
|
store_location
|
@@ -209,7 +213,11 @@ module Lockdown
|
|
209
213
|
def path_from_hash(hsh)
|
210
214
|
hsh[:controller].to_s + "/" + hsh[:action].to_s
|
211
215
|
end
|
212
|
-
|
216
|
+
|
217
|
+
def remote_url?(domain = nil)
|
218
|
+
return false if domain.nil? || domain.strip.length == 0
|
219
|
+
request.host.downcase != domain.downcase
|
220
|
+
end
|
213
221
|
end # InstanceMethods
|
214
222
|
end # Rails
|
215
223
|
end # Controller
|
data/lib/lockdown/version.rb
CHANGED
@@ -149,9 +149,9 @@ class LockdownGenerator < Rails::Generator::Base
|
|
149
149
|
end
|
150
150
|
|
151
151
|
begin
|
152
|
-
m.migration_template "db/migrate/
|
152
|
+
m.migration_template "db/migrate/create_admin_user.rb",
|
153
153
|
"db/migrate",
|
154
|
-
:migration_file_name => "
|
154
|
+
:migration_file_name => "create_admin_user"
|
155
155
|
rescue
|
156
156
|
puts "Admin User Group... migration exists"
|
157
157
|
end
|
data/website/generator.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>Lockdown</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/lockdown"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/lockdown" class="numbers">0.5.
|
36
|
+
<a href="http://rubyforge.org/projects/lockdown" class="numbers">0.5.8</a>
|
37
37
|
</div>
|
38
38
|
<h2>What</h2>
|
39
39
|
|
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>Lockdown</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/lockdown"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/lockdown" class="numbers">0.5.
|
36
|
+
<a href="http://rubyforge.org/projects/lockdown" class="numbers">0.5.8</a>
|
37
37
|
</div>
|
38
38
|
<h2>What</h2>
|
39
39
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lockdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Stone
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-06-
|
12
|
+
date: 2008-06-17 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -88,7 +88,7 @@ files:
|
|
88
88
|
- rails_generators/lockdown/templates/app/views/users/index.html.erb
|
89
89
|
- rails_generators/lockdown/templates/app/views/users/new.html.erb
|
90
90
|
- rails_generators/lockdown/templates/app/views/users/show.html.erb
|
91
|
-
- rails_generators/lockdown/templates/db/migrate/
|
91
|
+
- rails_generators/lockdown/templates/db/migrate/create_admin_user.rb
|
92
92
|
- rails_generators/lockdown/templates/db/migrate/create_permissions.rb
|
93
93
|
- rails_generators/lockdown/templates/db/migrate/create_profiles.rb
|
94
94
|
- rails_generators/lockdown/templates/db/migrate/create_user_groups.rb
|