Skip to content
GitLab
Menu
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
9d7e1a85
Commit
9d7e1a85
authored
Dec 03, 2009
by
Clément OUDOT
Browse files
Move default values in setDefaultValues
parent
36e8868e
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm
View file @
9d7e1a85
...
...
@@ -120,24 +120,11 @@ sub new {
$self
->
abort
(
"
Configuration error
",
"
You've to indicate a domain for cookies
"
)
unless
(
$self
->
{
domain
}
);
my
$domain
=
$self
->
{
domain
};
$self
->
{
domain
}
=~
s/^([^\.])/.$1/
;
$self
->
{
securedCookie
}
||=
0
;
$self
->
{
cookieName
}
||=
"
lemonldap
";
$self
->
{
authentication
}
||=
'
LDAP
';
$self
->
{
userDB
}
||=
'
LDAP
';
$self
->
{
passwordDB
}
||=
'
LDAP
';
$self
->
{
authentication
}
=~
s/^ldap/LDAP/
;
$self
->
{
mustRedirect
}
=
(
(
$ENV
{
REQUEST_METHOD
}
eq
'
POST
'
and
not
$self
->
param
('
newpassword
')
)
or
$self
->
param
('
logout
')
)
?
1
:
0
;
$self
->
{
SMTPServer
}
||=
'
localhost
';
$self
->
{
mailLDAPFilter
}
||=
'
(&(mail=$mail)(objectClass=inetOrgPerson))
';
$self
->
{
randomPasswordRegexp
}
||=
'
[A-Z]{3}[a-z]{5}.\d{2}
';
$self
->
{
mailFrom
}
||=
"
noreply@
"
.
$domain
;
$self
->
{
mailSubject
}
||=
"
Change password request
";
$self
->
{
mailBody
}
||=
'
Your new password is $password
';
# Authentication and userDB module are required and have to be in @ISA
foreach
(
qw(authentication userDB passwordDB)
)
{
...
...
@@ -235,17 +222,29 @@ sub getConf {
# Set default values.
sub
setDefaultValues
{
my
$self
=
shift
;
$self
->
{
whatToTrace
}
||=
'
uid
';
$self
->
{
whatToTrace
}
=~
s/^\$//
;
$self
->
{
httpOnly
}
=
1
unless
(
defined
(
$self
->
{
httpOnly
}
)
);
$self
->
{
portalSkin
}
||=
'
pastel
';
$self
->
{
portalDisplayLogout
}
=
1
unless
(
defined
(
$self
->
{
portalDisplayLogout
}
)
);
$self
->
{
portalDisplayResetPassword
}
=
1
unless
(
defined
(
$self
->
{
portalDisplayResetPassword
}
)
);
$self
->
{
whatToTrace
}
||=
'
uid
';
$self
->
{
whatToTrace
}
=~
s/^\$//
;
$self
->
{
httpOnly
}
=
1
unless
(
defined
(
$self
->
{
httpOnly
}
)
);
$self
->
{
portalSkin
}
||=
'
pastel
';
$self
->
{
portalDisplayLogout
}
=
1
unless
(
defined
(
$self
->
{
portalDisplayLogout
}
)
);
$self
->
{
portalDisplayResetPassword
}
=
1
unless
(
defined
(
$self
->
{
portalDisplayResetPassword
}
)
);
$self
->
{
portalDisplayChangePassword
}
=
1
unless
(
defined
(
$self
->
{
portalDisplayChangePassword
}
)
);
$self
->
{
portalDisplayAppslist
}
=
1
unless
(
defined
(
$self
->
{
portalDisplayAppslist
}
)
);
$self
->
{
portalAutocomplete
}
||=
"
off
";
$self
->
{
portalRequireOldPassword
}
=
1
unless
(
defined
(
$self
->
{
portalRequireOldPassword
}
)
);
$self
->
{
portalUserAttr
}
||=
"
_user
";
$self
->
{
portalDisplayAppslist
}
=
1
unless
(
defined
(
$self
->
{
portalDisplayAppslist
}
)
);
$self
->
{
portalAutocomplete
}
||=
"
off
";
$self
->
{
portalRequireOldPassword
}
=
1
unless
(
defined
(
$self
->
{
portalRequireOldPassword
}
)
);
$self
->
{
portalUserAttr
}
||=
"
_user
";
$self
->
{
securedCookie
}
||=
0
;
$self
->
{
cookieName
}
||=
"
lemonldap
";
$self
->
{
authentication
}
||=
'
LDAP
';
$self
->
{
userDB
}
||=
'
LDAP
';
$self
->
{
passwordDB
}
||=
'
LDAP
';
$self
->
{
authentication
}
=~
s/^ldap/LDAP/
;
$self
->
{
SMTPServer
}
||=
'
localhost
';
$self
->
{
mailLDAPFilter
}
||=
'
(&(mail=$mail)(objectClass=inetOrgPerson))
';
$self
->
{
randomPasswordRegexp
}
||=
'
[A-Z]{3}[a-z]{5}.\d{2}
';
$self
->
{
mailFrom
}
||=
"
noreply@
"
.
$self
->
{
domain
};
$self
->
{
mailSubject
}
||=
"
Change password request
";
$self
->
{
mailBody
}
||=
'
Your new password is $password
';
}
=begin WSDL
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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