logical_authz 0.1.9 → 0.1.10
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/app/helpers/logical_authz_helper.rb +8 -12
- metadata +5 -5
|
@@ -106,52 +106,48 @@ module LogicalAuthz
|
|
|
106
106
|
html_options ||= {}
|
|
107
107
|
url = options
|
|
108
108
|
if(authorized_url?(url, html_options))
|
|
109
|
-
link_to(name, options, html_options)
|
|
109
|
+
return link_to(name, options, html_options)
|
|
110
110
|
else
|
|
111
111
|
if block_given?
|
|
112
112
|
yield
|
|
113
|
-
else
|
|
114
|
-
""
|
|
115
113
|
end
|
|
114
|
+
return ""
|
|
116
115
|
end
|
|
117
116
|
end
|
|
118
117
|
|
|
119
118
|
def button_to_if_authorized(name, options = {}, html_options = {})
|
|
120
119
|
url = options
|
|
121
120
|
if(authorized_url?(url, html_options))
|
|
122
|
-
button_to(name, options, html_options)
|
|
121
|
+
return button_to(name, options, html_options)
|
|
123
122
|
else
|
|
124
123
|
if block_given?
|
|
125
124
|
yield
|
|
126
|
-
else
|
|
127
|
-
""
|
|
128
125
|
end
|
|
126
|
+
return ""
|
|
129
127
|
end
|
|
130
128
|
end
|
|
131
129
|
|
|
132
130
|
def link_to_remote_if_authorized(name, options = {}, html_options = nil)
|
|
133
131
|
url = options[:url]
|
|
134
132
|
if(authorized_url?(url, html_options))
|
|
135
|
-
link_to_remote(name, options, html_options)
|
|
133
|
+
return link_to_remote(name, options, html_options)
|
|
136
134
|
else
|
|
137
135
|
if block_given?
|
|
138
136
|
yield
|
|
139
|
-
else
|
|
140
|
-
""
|
|
141
137
|
end
|
|
138
|
+
return ""
|
|
142
139
|
end
|
|
143
140
|
end
|
|
144
141
|
|
|
145
142
|
def button_to_remote_if_authorized(name, options = {}, html_options = nil)
|
|
146
143
|
url = options[:url]
|
|
147
144
|
if(authorized_url?(url, html_options))
|
|
148
|
-
button_to_remote(name, options, html_options)
|
|
145
|
+
return button_to_remote(name, options, html_options)
|
|
149
146
|
else
|
|
150
147
|
if block_given?
|
|
151
148
|
yield
|
|
152
|
-
else
|
|
153
|
-
""
|
|
154
149
|
end
|
|
150
|
+
return ""
|
|
155
151
|
end
|
|
156
152
|
end
|
|
157
153
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: logical_authz
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 15
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 10
|
|
10
|
+
version: 0.1.10
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Judson Lester
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-02
|
|
18
|
+
date: 2011-03-02 00:00:00 -08:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies: []
|
|
21
21
|
|
|
@@ -95,7 +95,7 @@ rdoc_options:
|
|
|
95
95
|
- --main
|
|
96
96
|
- doc/README
|
|
97
97
|
- --title
|
|
98
|
-
- logical_authz-0.1.
|
|
98
|
+
- logical_authz-0.1.10 RDoc
|
|
99
99
|
require_paths:
|
|
100
100
|
- lib
|
|
101
101
|
required_ruby_version: !ruby/object:Gem::Requirement
|