Commit 40643f12 authored by Christophe Maudoux's avatar Christophe Maudoux

Fix parameters setting (#1661)

parent 77049642
......@@ -39,6 +39,10 @@ useRedirectOnError = 0
enabledModules = conf, sessions, notifications, 2ndFA, viewer
protection = manager
viewerHiddenPK = samlIDPMetaDataNodes samlSPMetaDataNodes portalDisplayLogout
viewerAllowBrowser = 1
staticPrefix = /static
languages = fr, en, vi, ar, de, it, zh
templateDir = __pwd__/lemonldap-ng-manager/site/templates
......
......@@ -87,7 +87,7 @@ sub init {
$self->csp(
"default-src 'self' $portal;frame-ancestors 'none';form-action 'self';"
);
$self->brw( $conf->{viewerAllowBrowser} );
$self->brw( $self->{viewerAllowBrowser} || $conf->{viewerAllowBrowser} );
$self->defaultRoute( $working[0]->defaultRoute );
# Find out more glyphicones at https://www.w3schools.com/icons/bootstrap_icons_glyphicons.asp
......
......@@ -31,6 +31,8 @@ sub addRoutes {
my ( $self, $conf ) = @_;
$self->ua( Lemonldap::NG::Common::UserAgent->new($conf) );
my $hiddenPK = '';
$hiddenPK = $self->{viewerHiddenPK} || $conf->{viewerHiddenPK};
my @enabledPK = ();
my @keys = qw(virtualHosts samlIDPMetaDataNodes samlSPMetaDataNodes
applicationList oidcOPMetaDataNodes oidcRPMetaDataNodes
......@@ -42,7 +44,7 @@ sub addRoutes {
# Ignore hidden ConfTree Primary Keys
push @enabledPK, $_
unless ( $self->{viewerHiddenPK} =~ /\b$_\b/ );
unless ( $hiddenPK =~ /\b$_\b/ );
}
# HTML template
......@@ -57,7 +59,7 @@ sub addRoutes {
['GET']
);
foreach ( split /\s+/, $self->{viewerHiddenPK} ) {
foreach ( split /\s+/, $hiddenPK ) {
$self->addRoute(
view => { ':cfgNum' => { $_ => 'rejectKey' } },
['GET']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment