lockdown 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/lib/lockdown/version.rb +1 -1
- data/lib/lockdown/view.rb +13 -9
- data/website/index.txt +5 -1
- metadata +2 -2
data/History.txt
CHANGED
data/lib/lockdown/version.rb
CHANGED
data/lib/lockdown/view.rb
CHANGED
@@ -11,12 +11,13 @@ module Lockdown
|
|
11
11
|
module Merb
|
12
12
|
include Lockdown::View::Core
|
13
13
|
def self.included(base)
|
14
|
-
base.send :alias_method, :
|
14
|
+
base.send :alias_method, :link_to_open, :link_to
|
15
|
+
base.send :alias_method, :link_to, :link_to_secured
|
15
16
|
end
|
16
17
|
|
17
|
-
def
|
18
|
+
def link_to_secured(name, url = '', options = {})
|
18
19
|
if authorized? url
|
19
|
-
return
|
20
|
+
return link_to_open(name, url, options)
|
20
21
|
end
|
21
22
|
return ""
|
22
23
|
end
|
@@ -30,14 +31,17 @@ module Lockdown
|
|
30
31
|
module Rails
|
31
32
|
include Lockdown::View::Core
|
32
33
|
def self.included(base)
|
33
|
-
base.send :alias_method, :
|
34
|
-
base.send :alias_method, :
|
34
|
+
base.send :alias_method, :link_to_open, :link_to
|
35
|
+
base.send :alias_method, :link_to, :link_to_secured
|
36
|
+
|
37
|
+
base.send :alias_method, :button_to_open, :button_to
|
38
|
+
base.send :alias_method, :button_to, :button_to_secured
|
35
39
|
end
|
36
40
|
|
37
|
-
def
|
41
|
+
def link_to_secured(name, options = {}, html_options = nil)
|
38
42
|
url = lock_down_url(options, html_options)
|
39
43
|
if authorized? url
|
40
|
-
return
|
44
|
+
return link_to_open(name,options,html_options)
|
41
45
|
end
|
42
46
|
return ""
|
43
47
|
end
|
@@ -47,10 +51,10 @@ module Lockdown
|
|
47
51
|
lnk.length == 0 ? name : lnk
|
48
52
|
end
|
49
53
|
|
50
|
-
def
|
54
|
+
def button_to_secured(name, options = {}, html_options = nil)
|
51
55
|
url = lock_down_url(options, html_options)
|
52
56
|
if authorized? url
|
53
|
-
return
|
57
|
+
return button_to_open(name,options,html_options)
|
54
58
|
end
|
55
59
|
return ""
|
56
60
|
end
|
data/website/index.txt
CHANGED
@@ -159,6 +159,11 @@ All configuration of Lockdown (Permissions and User Groups) are done in lib/lock
|
|
159
159
|
Lockdown doesn't have a concept of Roles. Instead, Lockdown users can be associated to one or many User Groups to allow for flexibility. In addition, you can use the admin screens to add new User Groups to the database.
|
160
160
|
|
161
161
|
Here are the parts to Lockdown:
|
162
|
+
|
163
|
+
<div style="text-align:center">
|
164
|
+
!model.jpg!
|
165
|
+
</div>
|
166
|
+
|
162
167
|
<ul>
|
163
168
|
<li><strong>Profiles</strong><br/>
|
164
169
|
<p>The profile model contains all non-user information related to person. Lockdown uses the profile record as the reference for updated_by and created_by. This allows you to remove the user record completely when you want to revoke access, but you still retain the foreign key for history.<br/>Here are the fields you have to start with:</p>
|
@@ -195,7 +200,6 @@ Here are the parts to Lockdown:
|
|
195
200
|
</li>
|
196
201
|
</ul>
|
197
202
|
|
198
|
-
|
199
203
|
h2. Forum
|
200
204
|
|
201
205
|
If you are having a problem understanding how to use Lockdown, please post your question on the lockdown group. If it's documentation related, I will keep this page updated to help everyone.
|
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.4.
|
4
|
+
version: 0.4.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: 2008-05-
|
12
|
+
date: 2008-05-08 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|