Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Maxime Besson
lemonldap-ng
Commits
a16d452a
Commit
a16d452a
authored
Apr 03, 2016
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AuthDemo asks for auth (#595)
parent
ca16584d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
14 deletions
+17
-14
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Plugins.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Plugins.pm
+11
-10
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Process.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Process.pm
+1
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm
+4
-2
No files found.
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main.pm
View file @
a16d452a
...
...
@@ -6,8 +6,8 @@ use Mouse;
our
$VERSION
=
'
2.0.0
';
extends
(
'
Lemonldap::NG::Portal::Main::Init
',
'
Lemonldap::NG::Portal::Main::Run
',
'
Lemonldap::NG::Portal::Main::Init
',
);
1
;
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Plugins.pm
View file @
a16d452a
...
...
@@ -24,22 +24,22 @@ sub enabledPlugins {
# Check if captcha is required
# TODO: verify if this list is OK
foreach
my
$key
(
qw(captcha_login_enabled captcha_mail_enabled captcha_register_enabled)
)
{
if
(
$self
->
conf
->
{
$key
}
)
{
$self
->
lmLog
(
'
Captcha enabled
',
'
debug
'
);
push
@res
,
'
::Plugins::Captcha
';
last
;
}
}
#
foreach my $key (
#
qw(captcha_login_enabled captcha_mail_enabled captcha_register_enabled))
#
{
#
if ( $self->conf->{$key} ) {
#
$self->lmLog( 'Captcha enabled', 'debug' );
#
push @res, '::Plugins::Captcha';
#
last;
#
}
#
}
# Check if SOAP is enabled
# TODO: REST
push
@res
,
'
SOAP
'
if
(
$self
->
conf
->
{
Soap
}
);
# Check if notification is enabled
push
@res
,
'
::Plugins::Notifications
'
if
(
$self
->
conf
->
{
notification
}
);
push
@res
,
'
::Plugins::Notifications
'
if
(
$self
->
conf
->
{
notification
s
}
);
foreach
my
$type
(
qw(password register)
)
{
my
$tmp
=
$self
->
conf
->
{
$type
};
if
(
$tmp
and
$tmp
ne
'
Null
'
)
{
...
...
@@ -60,6 +60,7 @@ sub enabledPlugins {
$self
->
lmLog
(
'
Custom plugins:
'
.
$self
->
conf
->
{
plugins
},
'
debug
'
);
push
@res
,
grep
(
/\w/
,
split
(
/,\s*/
,
$self
->
conf
->
{
plugins
}
)
);
}
return
@res
;
}
1
;
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Process.pm
View file @
a16d452a
...
...
@@ -44,7 +44,7 @@ sub restoreArgs {
# Verify url parameter
sub
controlUrl
{
my
(
$self
,
$req
)
=
@_
;
$req
->
datas
->
{
_url
}
||=
'';
$req
->
{
datas
}
->
{
_url
}
||=
'';
if
(
my
$url
=
$req
->
param
('
url
')
)
{
# REJECT NON BASE64 URL
...
...
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm
View file @
a16d452a
...
...
@@ -16,6 +16,8 @@ use Lemonldap::NG::Portal::Main::Request;
extends
'
Lemonldap::NG::Portal::Main::Process
';
use
constant
HANDLER
=>
'
Lemonldap::NG::Handler::PSGI::API
';
our
$VERSION
=
'
2.0.0
';
# List constants
...
...
@@ -34,14 +36,14 @@ sub sessionDatas {
# Lemonldap::NG::Portal::Main::Request
# - launch Lemonldap::NG::Common::PSGI::Request::handler()
sub
handler
{
my
(
$self
,
$req
)
=
shift
;
my
(
$self
,
$req
)
=
@_
;
unless
(
$self
->
conf
->
{
cfgNum
}
and
$self
->
conf
->
{
cfgNum
}
eq
HANDLER
->
lmConf
->
{
cfgNum
}
)
{
$self
->
reloadConf
();
}
bless
$req
,
'
Lemonldap::NG::Portal::Main::Request
';
return
$self
->
SUPER
::
handler
(
$req
);
return
$self
->
Lemonldap::NG::Common::PSGI::Router
::
handler
(
$req
);
}
# MAIN ENTRY POINTS (declared in Lemonldap::NG::Portal::Main::Init)
...
...
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