hone-lockdown 1.2.1 → 1.2.2
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/VERSION +1 -1
- data/lib/lockdown/frameworks/rails/controller.rb +13 -1
- data/lib/lockdown/rules.rb +2 -0
- data/lockdown.gemspec +112 -0
- metadata +3 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.2
|
@@ -110,7 +110,7 @@ module Lockdown
|
|
110
110
|
respond_to do |format|
|
111
111
|
format.html do
|
112
112
|
store_location
|
113
|
-
redirect_to
|
113
|
+
redirect_to access_denied_path
|
114
114
|
return
|
115
115
|
end
|
116
116
|
format.xml do
|
@@ -122,6 +122,18 @@ module Lockdown
|
|
122
122
|
end
|
123
123
|
end
|
124
124
|
|
125
|
+
def access_denied_path
|
126
|
+
if Lockdown::System.fetch(:access_denied_path_authorized) and Lockdown::System.fetch(:access_denied_path_public)
|
127
|
+
if logged_in?
|
128
|
+
Lockdown::System.fetch(:access_denied_path_authorized)
|
129
|
+
else
|
130
|
+
Lockdown::System.fetch(:access_denied_path_public)
|
131
|
+
end
|
132
|
+
else
|
133
|
+
Lockdown::System.fetch(:access_denied_path)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
125
137
|
def path_from_hash(hash)
|
126
138
|
hash[:controller].to_s + "/" + hash[:action].to_s
|
127
139
|
end
|
data/lib/lockdown/rules.rb
CHANGED
@@ -27,6 +27,8 @@ module Lockdown
|
|
27
27
|
:who_did_it => :current_user_id,
|
28
28
|
:default_who_did_it => 1,
|
29
29
|
:logout_on_access_violation => false,
|
30
|
+
:access_denied_path_authorized => nil,
|
31
|
+
:access_denied_path_public => nil,
|
30
32
|
:access_denied_path => "/",
|
31
33
|
:successful_login_path => "/",
|
32
34
|
:subdirectory => nil,
|
data/lockdown.gemspec
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{lockdown}
|
8
|
+
s.version = "1.2.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Andrew Stone"]
|
12
|
+
s.date = %q{2009-08-21}
|
13
|
+
s.description = %q{Lockdown is an authorization system for RubyOnRails (ver >= 2.1).}
|
14
|
+
s.email = %q{andy@stonean.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"README.txt"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
".gitignore",
|
20
|
+
"History.txt",
|
21
|
+
"README.txt",
|
22
|
+
"Rakefile",
|
23
|
+
"VERSION",
|
24
|
+
"lib/lockdown.rb",
|
25
|
+
"lib/lockdown/context.rb",
|
26
|
+
"lib/lockdown/database.rb",
|
27
|
+
"lib/lockdown/frameworks/rails.rb",
|
28
|
+
"lib/lockdown/frameworks/rails/controller.rb",
|
29
|
+
"lib/lockdown/frameworks/rails/view.rb",
|
30
|
+
"lib/lockdown/helper.rb",
|
31
|
+
"lib/lockdown/orms/active_record.rb",
|
32
|
+
"lib/lockdown/permission.rb",
|
33
|
+
"lib/lockdown/rules.rb",
|
34
|
+
"lib/lockdown/session.rb",
|
35
|
+
"lib/lockdown/system.rb",
|
36
|
+
"lockdown.gemspec",
|
37
|
+
"rails_generators/lockdown/lockdown_generator.rb",
|
38
|
+
"rails_generators/lockdown/templates/app/controllers/permissions_controller.rb",
|
39
|
+
"rails_generators/lockdown/templates/app/controllers/sessions_controller.rb",
|
40
|
+
"rails_generators/lockdown/templates/app/controllers/user_groups_controller.rb",
|
41
|
+
"rails_generators/lockdown/templates/app/controllers/users_controller.rb",
|
42
|
+
"rails_generators/lockdown/templates/app/helpers/permissions_helper.rb",
|
43
|
+
"rails_generators/lockdown/templates/app/helpers/user_groups_helper.rb",
|
44
|
+
"rails_generators/lockdown/templates/app/helpers/users_helper.rb",
|
45
|
+
"rails_generators/lockdown/templates/app/models/permission.rb",
|
46
|
+
"rails_generators/lockdown/templates/app/models/profile.rb",
|
47
|
+
"rails_generators/lockdown/templates/app/models/user.rb",
|
48
|
+
"rails_generators/lockdown/templates/app/models/user_group.rb",
|
49
|
+
"rails_generators/lockdown/templates/app/views/permissions/index.html.erb",
|
50
|
+
"rails_generators/lockdown/templates/app/views/permissions/show.html.erb",
|
51
|
+
"rails_generators/lockdown/templates/app/views/sessions/new.html.erb",
|
52
|
+
"rails_generators/lockdown/templates/app/views/user_groups/edit.html.erb",
|
53
|
+
"rails_generators/lockdown/templates/app/views/user_groups/index.html.erb",
|
54
|
+
"rails_generators/lockdown/templates/app/views/user_groups/new.html.erb",
|
55
|
+
"rails_generators/lockdown/templates/app/views/user_groups/show.html.erb",
|
56
|
+
"rails_generators/lockdown/templates/app/views/users/edit.html.erb",
|
57
|
+
"rails_generators/lockdown/templates/app/views/users/index.html.erb",
|
58
|
+
"rails_generators/lockdown/templates/app/views/users/new.html.erb",
|
59
|
+
"rails_generators/lockdown/templates/app/views/users/show.html.erb",
|
60
|
+
"rails_generators/lockdown/templates/config/initializers/lockit.rb",
|
61
|
+
"rails_generators/lockdown/templates/db/migrate/create_admin_user.rb",
|
62
|
+
"rails_generators/lockdown/templates/db/migrate/create_permissions.rb",
|
63
|
+
"rails_generators/lockdown/templates/db/migrate/create_profiles.rb",
|
64
|
+
"rails_generators/lockdown/templates/db/migrate/create_user_groups.rb",
|
65
|
+
"rails_generators/lockdown/templates/db/migrate/create_users.rb",
|
66
|
+
"rails_generators/lockdown/templates/lib/lockdown/README",
|
67
|
+
"rails_generators/lockdown/templates/lib/lockdown/init.rb",
|
68
|
+
"spec/lockdown/database_spec.rb",
|
69
|
+
"spec/lockdown/frameworks/rails/controller_spec.rb",
|
70
|
+
"spec/lockdown/frameworks/rails/view_spec.rb",
|
71
|
+
"spec/lockdown/frameworks/rails_spec.rb",
|
72
|
+
"spec/lockdown/permission_spec.rb",
|
73
|
+
"spec/lockdown/rules_spec.rb",
|
74
|
+
"spec/lockdown/session_spec.rb",
|
75
|
+
"spec/lockdown/system_spec.rb",
|
76
|
+
"spec/lockdown_spec.rb",
|
77
|
+
"spec/rcov.opts",
|
78
|
+
"spec/spec.opts",
|
79
|
+
"spec/spec_helper.rb"
|
80
|
+
]
|
81
|
+
s.has_rdoc = true
|
82
|
+
s.homepage = %q{http://stonean.com/wiki/lockdown}
|
83
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
84
|
+
s.require_paths = ["lib"]
|
85
|
+
s.rubygems_version = %q{1.3.1}
|
86
|
+
s.summary = %q{Lockdown is an authorization system for RubyOnRails (ver >= 2.1).}
|
87
|
+
s.test_files = [
|
88
|
+
"spec/lockdown/database_spec.rb",
|
89
|
+
"spec/lockdown/rules_spec.rb",
|
90
|
+
"spec/lockdown/session_spec.rb",
|
91
|
+
"spec/lockdown/frameworks/rails_spec.rb",
|
92
|
+
"spec/lockdown/frameworks/rails/view_spec.rb",
|
93
|
+
"spec/lockdown/frameworks/rails/controller_spec.rb",
|
94
|
+
"spec/lockdown/permission_spec.rb",
|
95
|
+
"spec/lockdown/system_spec.rb",
|
96
|
+
"spec/lockdown_spec.rb",
|
97
|
+
"spec/spec_helper.rb"
|
98
|
+
]
|
99
|
+
|
100
|
+
if s.respond_to? :specification_version then
|
101
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
102
|
+
s.specification_version = 2
|
103
|
+
|
104
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
105
|
+
s.add_runtime_dependency(%q<ruby2ruby>, [">= 0"])
|
106
|
+
else
|
107
|
+
s.add_dependency(%q<ruby2ruby>, [">= 0"])
|
108
|
+
end
|
109
|
+
else
|
110
|
+
s.add_dependency(%q<ruby2ruby>, [">= 0"])
|
111
|
+
end
|
112
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hone-lockdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
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: 2009-08-
|
12
|
+
date: 2009-08-21 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- lib/lockdown/rules.rb
|
49
49
|
- lib/lockdown/session.rb
|
50
50
|
- lib/lockdown/system.rb
|
51
|
+
- lockdown.gemspec
|
51
52
|
- rails_generators/lockdown/lockdown_generator.rb
|
52
53
|
- rails_generators/lockdown/templates/app/controllers/permissions_controller.rb
|
53
54
|
- rails_generators/lockdown/templates/app/controllers/sessions_controller.rb
|