dansguardian 0.5.1 → 0.5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog +4 -0
- data/lib/dansguardian.rb +1 -1
- data/lib/dansguardian/config/auth.rb +11 -0
- data/lib/dansguardian/config/auth/sql.rb +47 -0
- metadata +5 -2
data/Changelog
CHANGED
data/lib/dansguardian.rb
CHANGED
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'dansguardian/config/constants'
|
2
|
+
|
3
|
+
module DansGuardian
|
4
|
+
class Config
|
5
|
+
module Auth
|
6
|
+
# Handle SQL Auth plugin by G. De Rosa
|
7
|
+
# http://dev.vemarsas.it/projects/dansguardian
|
8
|
+
class SQL < ::ConfigFiles::Base
|
9
|
+
|
10
|
+
# Exceptions
|
11
|
+
class ValidationFailed < ValidationFailed; end
|
12
|
+
|
13
|
+
on :unknown_parameter do |s|
|
14
|
+
"FIXME: unknown parameter: value = #{s}"
|
15
|
+
end
|
16
|
+
|
17
|
+
parameter :plugname
|
18
|
+
|
19
|
+
parameter :sqlauthgroups
|
20
|
+
|
21
|
+
parameter :sqlauthdb
|
22
|
+
parameter :sqlauthdbhost
|
23
|
+
parameter :sqlauthdbname
|
24
|
+
parameter :sqlauthdbuser
|
25
|
+
parameter :sqlauthdbpass
|
26
|
+
|
27
|
+
parameter :sqlauthipuserquery
|
28
|
+
parameter :sqlauthusergroupquery
|
29
|
+
|
30
|
+
parameter :sqlauthcachettl
|
31
|
+
|
32
|
+
parameter :sqlauthdebug,
|
33
|
+
'on' => true,
|
34
|
+
'off' => false
|
35
|
+
|
36
|
+
validate do |conf|
|
37
|
+
raise ValidationFailed,
|
38
|
+
"Cannot find plugname='sqlauth' in config file" unless
|
39
|
+
conf[:plugname] == 'sqlauth'
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
|
metadata
CHANGED
@@ -5,8 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
+
- 2
|
8
9
|
- 1
|
9
|
-
version: 0.5.1
|
10
|
+
version: 0.5.2.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Guido De Rosa
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-25 00:00:00 +01:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
@@ -41,6 +42,8 @@ extra_rdoc_files:
|
|
41
42
|
files:
|
42
43
|
- lib/dansguardian/config/filtergroup.rb
|
43
44
|
- lib/dansguardian/config/main.rb
|
45
|
+
- lib/dansguardian/config/auth.rb
|
46
|
+
- lib/dansguardian/config/auth/sql.rb
|
44
47
|
- lib/dansguardian/config/constants.rb
|
45
48
|
- lib/dansguardian/extensions/float.rb
|
46
49
|
- lib/dansguardian/parser.rb
|