webs 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/controller/webs_controller.rb +10 -1
- data/lib/helper/params.rb +4 -0
- data/lib/webs.rb +1 -1
- data/webs.gemspec +1 -1
- metadata +3 -3
data/Rakefile
CHANGED
@@ -29,10 +29,19 @@ module Webs
|
|
29
29
|
Digest::MD5.hexdigest(webs_auth_string + secret)
|
30
30
|
end
|
31
31
|
|
32
|
-
|
32
|
+
# FILTERS
|
33
|
+
def validate_webs_session
|
33
34
|
render :text => "Access Denied: Webs::SECRET not defined." and return(false) unless defined?( Webs::SECRET )
|
34
35
|
render :text => "Access Denied" and return(false) unless fw_sig == webs_auth( Webs::SECRET )
|
35
36
|
end
|
37
|
+
|
38
|
+
def require_webs_user
|
39
|
+
render( :text => "<fw:require-login />" ) unless !fw_sig_user.blank? && fw_sig_user.to_i > 0
|
40
|
+
end
|
41
|
+
|
42
|
+
def require_webs_admin
|
43
|
+
render(:text => "You are not authorized.") unless webs_admin?
|
44
|
+
end
|
36
45
|
end
|
37
46
|
end
|
38
47
|
end
|
data/lib/helper/params.rb
CHANGED
data/lib/webs.rb
CHANGED
data/webs.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chuck Olczak
|