Commit bfa7482a authored by Christophe Maudoux's avatar Christophe Maudoux 🐛

WIP - Hidden ConfTree PK (#1661)

parent bc40d48a
......@@ -296,6 +296,7 @@ sub defaultValues {
'useRedirectOnError' => 1,
'useSafeJail' => 1,
'utotp2fActivation' => 0,
'viewerHiddenPK' => 'virtualHosts',
'webIDAuthnLevel' => 1,
'webIDExportedVars' => {},
'whatToTrace' => 'uid',
......
......@@ -3558,6 +3558,10 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
],
'type' => 'select'
},
'viewerHiddenPK' => {
'default' => 'virtualHosts',
'type' => 'text'
},
'virtualHosts' => {
'type' => 'virtualHostContainer'
},
......
......@@ -915,6 +915,14 @@ sub attributes {
flags => 'hp',
},
# Viewer
viewerHiddenPK => {
type => 'text',
default => 'virtualHosts',
documentation => 'ConfTree hidden primary keys',
flags => 'm',
},
# Notification
oldNotifFormat => {
type => 'bool',
......
......@@ -19,7 +19,7 @@ use feature 'state';
extends 'Lemonldap::NG::Common::Conf::RESTServer';
our $VERSION = '2.0.2';
our $VERSION = '2.0.3';
#############################
# I. INITIALIZATION METHODS #
......@@ -33,20 +33,40 @@ sub addRoutes {
my ( $self, $conf ) = @_;
$self->ua( Lemonldap::NG::Common::UserAgent->new($conf) );
my @enabledPK = ();
my @keys = qw(virtualHosts samlIDPMetaDataNodes samlSPMetaDataNodes
applicationList oidcOPMetaDataNodes oidcRPMetaDataNodes
casSrvMetaDataNodes casAppMetaDataNodes
authChoiceModules grantSessionRules combModules
openIdIDPList);
foreach (@keys) {
# Ignore hidden ConfTree Primary Keys
push @enabledPK, $_
unless ( $conf->{viewerHiddenPK} =~ /\b$_\b/ );
}
# HTML template
$self->addRoute( 'viewer.html', undef, ['GET'] )
# READ
# Special keys
# ->addRoute(
# view => {
# ':cfgNum' => [
# qw(virtualHosts samlIDPMetaDataNodes samlSPMetaDataNodes
# applicationList oidcOPMetaDataNodes oidcRPMetaDataNodes
# casSrvMetaDataNodes casAppMetaDataNodes
# authChoiceModules grantSessionRules combModules
# openIdIDPList)
# ]
# },
# ['GET']
# )
->addRoute(
view => {
':cfgNum' => [
qw(virtualHosts samlIDPMetaDataNodes samlSPMetaDataNodes
applicationList oidcOPMetaDataNodes oidcRPMetaDataNodes
casSrvMetaDataNodes casAppMetaDataNodes
authChoiceModules grantSessionRules combModules
openIdIDPList)
]
':cfgNum' => \@enabledPK
},
['GET']
)
......@@ -56,7 +76,7 @@ sub addRoutes {
# Difference between confs
->addRoute( diff => { ':conf1' => { ':conf2' => 'diff' } } )
->addRoute( 'diff.html', undef, ['GET'] )
->addRoute( 'diff.html', undef, ['GET'] );
}
##@method public PSGI-JSON-response prx()
......@@ -94,7 +114,6 @@ sub prx {
# - getConfByNum: override SUPER method to be able to use Zero
sub getConfByNum {
my ( $self, $cfgNum, @args ) = @_;
unless ( %{ $self->currentConf }
......
###
LemonLDAP::NG Manager client
LemonLDAP::NG Viewer client
This is the main app file. Other are:
- struct.json and js/confTree.js that contains the full tree
......
// Generated by CoffeeScript 1.12.7
/*
LemonLDAP::NG Manager client
LemonLDAP::NG Viewer client
This is the main app file. Other are:
- struct.json and js/confTree.js that contains the full tree
......
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