Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
lemonldap-ng
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
244
Issues
244
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LemonLDAP NG
lemonldap-ng
Commits
2f31b05c
Commit
2f31b05c
authored
Feb 07, 2017
by
Xavier Guimard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep combination keys (#1151)
parent
46946794
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Compact.pm
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Compact.pm
+6
-8
lemonldap-ng-manager/t/15-combination.t
lemonldap-ng-manager/t/15-combination.t
+5
-1
lemonldap-ng-manager/t/jsonfiles/15-combination.json
lemonldap-ng-manager/t/jsonfiles/15-combination.json
+3
-2
No files found.
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Compact.pm
View file @
2f31b05c
...
...
@@ -17,14 +17,12 @@ sub compactConf {
$mod
=
lc
(
$mod
);
$keep
{
$mod
}
=
1
;
}
if
(
$keep
{
multi
}
)
{
foreach
my
$prm
(
qw(multiAuthStack multiUserDBStack)
)
{
my
@tmp
=
split
/;\s*/
,
$conf
->
{
$prm
};
foreach
(
@tmp
)
{
s/^(\w+).*$/lc($1)/
e
;
s/OpenIDConnect/oidc/i
;
$keep
{
$_
}
=
1
;
}
if
(
$keep
{
combination
}
)
{
foreach
my
$md
(
keys
%
{
$conf
->
{
combModules
}})
{
$_
=
$conf
->
{
combModules
}
->
{
$md
}
->
{
type
};
s/^(\w+).*$/lc($1)/
e
;
s/OpenIDConnect/oidc/i
;
$keep
{
$_
}
=
1
;
}
}
if
(
$keep
{
choice
}
)
{
...
...
lemonldap-ng-manager/t/15-combination.t
View file @
2f31b05c
...
...
@@ -27,7 +27,11 @@ ok( $resBody->{result} == 1, "JSON response contains \"result:1\"" )
ok
(
$res
=
&client
->
_get
(
'
/confs/2/combModules
',
'
application/json
'
),
'
Get combModules
');
ok
(
$resBody
=
from_json
(
$res
->
[
2
]
->
[
0
]
),
"
Result body contains JSON text
"
);
count
(
6
);
ok
(
$res
=
&client
->
_get
(
'
/confs/2/ldapServer
',
'
application/json
'
),
'
Get combModules
');
ok
(
$resBody
=
from_json
(
$res
->
[
2
]
->
[
0
]
),
"
Result body contains JSON text
"
);
ok
(
$resBody
->
{
value
}
eq
'
ldap://192.168.1.1
',
'
Key ldapServer has been modified
');
count
(
8
);
done_testing
(
count
()
);
...
...
lemonldap-ng-manager/t/jsonfiles/15-combination.json
View file @
2f31b05c
...
...
@@ -828,10 +828,11 @@
"type"
:
"keyTextContainer"
},
{
"
_
nodes"
:
[{
"nodes"
:
[{
"default"
:
"ldap://localhost"
,
"id"
:
"ldapServer"
,
"title"
:
"ldapServer"
"title"
:
"ldapServer"
,
"data"
:
"ldap://192.168.1.1"
},
{
"default"
:
389
,
...
...
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