Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Xavier Bachelot
lemonldap-ng
Commits
78506944
Commit
78506944
authored
Dec 30, 2009
by
Yadd
Browse files
Boolean type
"New virtual host" is ready
parent
c759234a
Changes
10
Hide whitespace changes
Inline
Side-by-side
modules/lemonldap-ng-manager/example/skins/default/manager.css
View file @
78506944
...
...
@@ -219,6 +219,11 @@ input
background
:
url(expandable-last.gif)
0
-2px
no-repeat
;
}
.simpleTree
.folder-hidden
,
.folder-hidden-last
{
display
:
none
;
}
.simpleTree
.doc
{
margin-left
:
-16px
;
...
...
modules/lemonldap-ng-manager/example/skins/default/manager.js
View file @
78506944
...
...
@@ -88,6 +88,11 @@ function btext(id) {
display
(
'
btext
'
,
'
Clef
'
);
$
(
'
#newkb,#delkb
'
).
css
(
'
display
'
,
''
);
}
function
bool
(
id
)
{
currentId
=
id
;
if
(
lmdata
(
id
)
==
1
){
$
(
'
#On
'
).
attr
(
'
checked
'
,
true
)}
else
{
$
(
'
#Off
'
).
attr
(
'
checked
'
,
true
)}
display
(
'
bool
'
,
lmtext
(
id
));
}
function
int
(
id
)
{
currentId
=
id
;
$
(
'
#int
'
).
attr
(
'
value
'
,
lmdata
(
id
));
...
...
modules/lemonldap-ng-manager/example/skins/default/manager.tpl
View file @
78506944
...
...
@@ -50,7 +50,7 @@ var scriptname='<TMPL_VAR NAME="SCRIPT_NAME">';var imagepath='<TMPL_VAR NAME="DI
<lang
en=
"Apply"
fr=
"Appliquer"
/>
</button>
<button
id=
"bnewvh"
onclick=
"newVh('test25.example.com');return false;"
class=
"ui-state-default ui-corner-all"
>
<button
id=
"bnewvh"
style=
"display:none;"
onclick=
"newVh('test25.example.com');return false;"
class=
"ui-state-default ui-corner-all"
>
<lang
en=
"New virtual host"
fr=
"Nouvel hôte virtuel"
/>
</button>
...
...
@@ -109,6 +109,11 @@ var scriptname='<TMPL_VAR NAME="SCRIPT_NAME">';var imagepath='<TMPL_VAR NAME="DI
<input
type=
"text"
id=
"int"
onchange=
"setlmdata(currentId,this.value)"
/>
</div>
<div
id=
"content_bool"
class=
"hidden"
>
<input
id=
"On"
type=
"radio"
name=
"boolean"
value=
"1"
onclick=
"setlmdata(currentId,1)"
/>
<lang
en=
"On"
fr=
"Activé"
/>
<input
id=
"Off"
type=
"radio"
name=
"boolean"
value=
"0"
onclick=
"setlmdata(currentId,0)"
/>
<lang
en=
"Off"
fr=
"Désactivé"
/>
</div>
<div
id=
"content_btext"
class=
"hidden"
>
<input
type=
"text"
id=
"btextKey"
onchange=
"setlmtext(currentId,this.value)"
/>
<input
type=
"text"
id=
"btextValue"
onchange=
"setlmdata(currentId,this.value)"
/>
</div>
...
...
modules/lemonldap-ng-manager/example/skins/default/tree.js
View file @
78506944
...
...
@@ -112,9 +112,13 @@ $.fn.simpleTree = function(opt){
{
url
=
$
.
trim
(
url
.
replace
(
/.*
\{
url:
(
.*
)\}
/i
,
'
$1
'
));
var
js
=
''
;
var
call
=
''
;
if
(
url
.
indexOf
(
'
,js:
'
)){
js
=
$
.
trim
(
url
.
replace
(
/.*,js:
(
.*
)
/i
,
'
$1
'
));
url
=
$
.
trim
(
url
.
replace
(
/,js:.*/i
,
''
));
call
=
url
.
match
(
/.*,call:
(
.*
)
/i
);
if
(
call
==
null
){
call
=
''
;}
else
{
call
=
call
[
1
].
replace
(
/,call.*$/
,
''
);}
js
=
url
.
match
(
/.*,js:
(
.*
)
/i
);
if
(
js
==
null
){
js
=
''
;}
else
{
js
=
js
[
1
].
replace
(
/,call.*$/
,
''
);}
url
=
$
.
trim
(
url
.
replace
(
/,
(?:
js|call
)
:.*/i
,
''
));
}
$
.
ajax
({
type
:
"
GET
"
,
...
...
@@ -135,7 +139,8 @@ $.fn.simpleTree = function(opt){
{
callback
(
node
);
}
if
(
js
.
length
)
$
(
'
>span
'
,
node
.
parent
()).
click
(
function
(){
eval
(
js
+
'
()
'
)});
if
(
js
.
length
){
if
(
!
js
.
match
(
/
\(
/
))
js
+=
'
()
'
;
$
(
'
>span
'
,
node
.
parent
()).
click
(
function
(){
eval
(
js
)});}
if
(
call
.
length
){
if
(
!
call
.
match
(
/
\(
/
))
call
+=
'
()
'
;
eval
(
call
);}
},
error
:
function
(
xhr
,
ajaxOptions
,
thrownError
){
TREE
.
closeNearby
(
node
);
...
...
@@ -212,7 +217,9 @@ $.fn.simpleTree = function(opt){
var
childNode
=
$
(
'
>ul
'
,
this
);
if
(
childNode
.
size
()
>
0
){
var
setClassName
=
'
folder-
'
;
if
(
className
&&
className
.
indexOf
(
'
open
'
)
>=
0
){
if
(
className
&&
className
.
indexOf
(
'
hidden
'
)
>=
0
){
setClassName
=
setClassName
+
'
hidden
'
;
}
else
if
(
className
&&
className
.
indexOf
(
'
open
'
)
>=
0
){
setClassName
=
setClassName
+
'
open
'
;
open
=
true
;
}
else
{
...
...
modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Downloader.pm
View file @
78506944
...
...
@@ -47,7 +47,10 @@ sub node {
"
$target
",
"
node=
$node
/
$target
",
$tmp
->
{
$target
}
->
{
_help
}
||
$help
,
$tmp
->
{
$target
}
->
{
_js
}
$tmp
->
{
$target
}
->
{
_js
},
'',
0
,
$tmp
->
{
$target
}
->
{
_call
}
);
next
;
}
...
...
@@ -64,9 +67,10 @@ sub node {
"
$node
/
$target
",
$target
,
'',
$tmp
->
{
$target
}
->
{
_js
},
$tmp
->
{
$target
}
->
{
_help
}
||
$help
)
.
"
<ul>
";
$res
.=
$self
->
node
("
$node
/
$target
");
$res
.=
"
</ul></li>
";
)
.
"
<ul>
"
.
$self
->
node
("
$node
/
$target
")
.
"
</ul></li>
";
}
# subnode points to a configuration node
...
...
@@ -332,7 +336,7 @@ sub confObj {
# @param $noT Optional flag to block translation
# @return HTML string
sub
ajaxNode
{
my
(
$self
,
$id
,
$text
,
$param
,
$help
,
$js
,
$data
,
$noT
)
=
@_
;
my
(
$self
,
$id
,
$text
,
$param
,
$help
,
$js
,
$data
,
$noT
,
$call
)
=
@_
;
$param
.=
"
&cfgNum=
$self
->{cfgNum}
";
return
$self
->
li
(
$id
)
...
...
@@ -341,6 +345,7 @@ sub ajaxNode {
.
$self
->
li
("
sub_
$id
")
.
"
.{url:
$ENV
{SCRIPT_NAME}?
$param
"
.
(
$js
?
"
,js:
$js
"
:
''
)
.
(
$call
?
"
,call:
$call
"
:
''
)
.
"
}</li></ul></li>
\n
";
}
...
...
modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Help.pm
View file @
78506944
...
...
@@ -25,8 +25,11 @@ sub import {
}
}
$l
||=
"
en
";
foreach
$h
(
qw(authParams cookieName domain groups ldap macros storage timeout vars
whatToTrace virtualHosts)
)
{
foreach
$h
(
qw(authParams cookieName domain groups ldap macros storage timeout vars
whatToTrace virtualHosts)
)
{
*
{"
${caller_package}
::help_
$h
"}
=
\
&
{"
help_
${h}
_
$l
"};
}
}
...
...
modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm
View file @
78506944
...
...
@@ -36,14 +36,15 @@ sub new {
# Try to get configuration values from local configuration
my
$config
=
Lemonldap::NG::Common::
Conf
->
new
(
$self
->
{
configStorage
}
);
unless
(
$config
)
{
unless
(
$config
)
{
$self
->
abort
(
"
Unable to start
",
"
Configuration not loaded
\n
"
.
$
Lemonldap::NG::Common::Conf::
msg
);
}
my
$localconf
=
$config
->
getLocalConf
(
MANAGERSECTION
);
my
$localconf
=
$config
->
getLocalConf
(
MANAGERSECTION
);
if
(
$localconf
)
{
$self
->
{
$_
}
=
$args
->
{
$_
}
||
$localconf
->
{
$_
}
foreach
(
keys
%$localconf
);
if
(
$localconf
)
{
$self
->
{
$_
}
=
$args
->
{
$_
}
||
$localconf
->
{
$_
}
foreach
(
keys
%$localconf
);
}
# Check some paramaters
...
...
modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Uploader.pm
View file @
78506944
...
...
@@ -113,7 +113,7 @@ sub confUpload {
foreach
(
@
{
$result
->
getChildrenByTagName
('
ignore
')
}
)
{
my
$node
=
$_
->
getAttribute
('
value
');
$node
=~
s/^.*node=(.*?)(?:&.*)?\}$/$1/
;
foreach
my
$k
(
$self
->
findAllConfKeys
(
$self
->
corresp
(
$node
)
)
)
{
foreach
my
$k
(
$self
->
findAllConfKeys
(
$self
->
corresp
(
$node
)
)
)
{
my
$v
=
$self
->
keyToH
(
$k
,
$self
->
conf
);
$v
=
$self
->
keyToH
(
$k
,
$self
->
defaultConf
)
unless
(
defined
$v
);
if
(
defined
$v
)
{
...
...
@@ -238,6 +238,7 @@ sub findAllConfKeys {
# @param $k2 Optional subkey
sub
setKeyToH
{
my
$value
=
pop
;
return
unless
(
ref
(
$value
)
or
length
(
$value
)
);
my
(
$self
,
$h
,
$key
,
$k2
)
=
@_
;
my
$tmp
=
$h
;
$key
=~
s/^\///
;
...
...
modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_Struct.pm
View file @
78506944
...
...
@@ -98,13 +98,13 @@ sub struct {
managerDn
=>
'
text:/managerDn
',
managerPassword
=>
'
text:/managerPassword
',
},
SSLRequired
=>
'
int
:/SSLRequired
',
SSLRequired
=>
'
bool
:/SSLRequired
',
},
# LOGS PARAMETERS
logParams
=>
{
_nodes
=>
[
qw(useXForwardedForIP whatToTrace)
],
useXForwardedForIP
=>
'
int
:/useXForwardedForIP
',
useXForwardedForIP
=>
'
bool
:/useXForwardedForIP
',
whatToTrace
=>
'
text:/whatToTrace:whatToTrace:text
',
},
...
...
@@ -144,10 +144,10 @@ sub struct {
_js
=>
'
hashRoot
'
},
},
singleSession
=>
'
int
:/singleSession
',
singleIP
=>
'
int
:/singleIP
',
singleUserByIP
=>
'
int
:/singleUserByIP
',
storePassword
=>
'
int
:/storePassword
',
singleSession
=>
'
bool
:/singleSession
',
singleIP
=>
'
bool
:/singleIP
',
singleUserByIP
=>
'
bool
:/singleUserByIP
',
storePassword
=>
'
bool
:/storePassword
',
timeout
=>
'
text:/timeout:timeout:text
',
},
...
...
@@ -156,15 +156,15 @@ sub struct {
_nodes
=>
[
qw(Soap exportedAttr trustedDomains https notifications passwordManagement userControl)
],
Soap
=>
'
int
:/Soap
',
https
=>
'
int
:/https
',
Soap
=>
'
bool
:/Soap
',
https
=>
'
bool
:/https
',
exportedAttr
=>
'
text:/exportedAttr
',
notifications
=>
{
_nodes
=>
[
qw(notification notificationStorage notificationStorageOptions)
],
_help
=>
'
notifications
',
notification
=>
'
int
:/notification
',
notification
=>
'
bool
:/notification
',
notificationStorage
=>
'
text:/notificationStorage
',
notificationStorageOptions
=>
{
_nodes
=>
['
hash:/notificationStorageOptions
'],
...
...
@@ -203,6 +203,7 @@ sub struct {
_nodes
=>
['
nhash:/locationRules:virtualHosts:none
'],
_upload
=>
['
/exportedHeaders
'],
_help
=>
'
default
',
_call
=>
'
$(
\'
#bnewvh
\'
).show();
',
},
};
}
...
...
modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_i18n.pm
View file @
78506944
...
...
@@ -72,11 +72,13 @@ sub en {
ldapServer => 'LDAP Server',
logParams => 'Logs parameters',
macros => 'Macros',
mailBody => 'M
essage
content',
mailBody => 'M
ail
content',
mailFrom => 'Mail sender',
mailSubject => 'Mail subject',
managerDn => 'LDAP Account',
managerPassword => 'LDAP Password',
notification => 'Active notifications',
notifications => 'Notifications',
notificationStorage => 'Notifications storage type',
notificationStorageOptions => 'Storage module parameters',
passwordDB => 'Passaword database type',
...
...
@@ -101,6 +103,7 @@ sub en {
uploadDenied => 'Upload denied',
userDB => 'Users database type',
userControl => 'Username control',
useXForwardedForIP => "Use X-Forwarded-For header address",
virtualHosts => 'Virtual Hosts',
whatToTrace => "Attribute to use in Apache's logs",
};
...
...
@@ -135,15 +138,18 @@ sub fr {
macros => 'Macros',
mailBody => 'Contenu du message',
mailFrom => 'Expéditeur du message',
mailSubject => 'Sujet du message',
managerDn => 'Compte de connexion LDAP',
managerPassword => 'Mot de passe LDAP',
notification => 'Active les notifications',
notifications => 'Notifications',
notificationStorage => 'Type de stockage des notifications',
notificationStorageOptions => 'Paramètres du module de stockage',
passwordDB => 'Type de base de données des mots-de-passe',
passwordManagement => 'Gestion des mots-de-passe',
portal => 'Portail',
randomPasswordRegexp => 'Expression regulière pour la génération des mots-de-passe',
randomPasswordRegexp =>
'Expression regulière pour la génération des mots-de-passe',
rules => 'Règles',
securedCookie => 'Cookie sécurisé (SSL)',
sessionParams => 'Paramètres des Sessions Parameters',
...
...
@@ -153,7 +159,8 @@ sub fr {
singleUserByIP => 'Une seule adresse IP par utilisateur',
SMTPServer => 'Serveur SMTP',
Soap => 'Active les fonctions SOAP du portail',
storePassword => "Stocke le mot-de-passe de l'utilisateur dans les données de session",
storePassword =>
"Stocke le mot-de-passe de l'utilisateur dans les données de session",
syntaxError => 'Erreur de syntaxe',
syslog => 'Facilité syslog',
timeout => 'Durée de vie des sessions',
...
...
@@ -162,6 +169,8 @@ sub fr {
uploadDenied => 'Téléchargement refusé',
userDB => "Type de base de données d'utilisateurs",
userControl => "Contrôle du nom d'utilisateur",
useXForwardedForIP =>
"Utiliser l'adresse IP de l'en-tête X-Forwarded-For",
virtualHosts => 'Hôtes virtuels',
whatToTrace => "Donnée à inscrire dans les journaux d'Apache",
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment