lockdown 1.6.4 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/lockdown/frameworks/rails/controller.rb +7 -1
- data/lib/lockdown.rb +1 -1
- data/lockdown.gemspec +2 -2
- metadata +2 -2
@@ -77,6 +77,11 @@ module Lockdown
|
|
77
77
|
|
78
78
|
path = url_parts[5]
|
79
79
|
|
80
|
+
subdir = Lockdown::System.fetch(:subdirectory)
|
81
|
+
if subdir && subdir == path[1,subdir.length]
|
82
|
+
path = path[(subdir.length+1)..-1]
|
83
|
+
end
|
84
|
+
|
80
85
|
return true if path_allowed?(path)
|
81
86
|
|
82
87
|
begin
|
@@ -120,7 +125,8 @@ module Lockdown
|
|
120
125
|
end
|
121
126
|
|
122
127
|
def path_from_hash(hash)
|
123
|
-
|
128
|
+
subdir = Lockdown::System.fetch(:subdirectory)
|
129
|
+
(subdir ? subdir + "/" : "") + hash[:controller].to_s + "/" + hash[:action].to_s
|
124
130
|
end
|
125
131
|
|
126
132
|
def remote_url?(domain = nil)
|
data/lib/lockdown.rb
CHANGED
data/lockdown.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{lockdown}
|
8
|
-
s.version = "1.6.
|
8
|
+
s.version = "1.6.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andrew Stone"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-03-01}
|
13
13
|
s.description = %q{Restrict access to your controller actions. Supports basic model level restrictions as well}
|
14
14
|
s.email = %q{andy@stonean.com}
|
15
15
|
s.extra_rdoc_files = [
|
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: 1.6.
|
4
|
+
version: 1.6.5
|
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: 2010-
|
12
|
+
date: 2010-03-01 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|