Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nicolas Quiniou-Briand
lemonldap-ng
Commits
b7e96790
Commit
b7e96790
authored
Dec 04, 2017
by
Clément OUDOT
Browse files
Fix construction of searched attributes for groups (#1332)
parent
b3ff6e26
Changes
1
Hide whitespace changes
Inline
Side-by-side
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDB/LDAP.pm
View file @
b7e96790
...
...
@@ -13,19 +13,14 @@ has ldapGroupAttributeNameSearch => (
is
=>
'
rw
',
lazy
=>
1
,
builder
=>
sub
{
return
$_
[
0
]
->
{
conf
}
->
{
ldapGroupAttributeNameSearch
}
?
[
split
(
/\s+/
,
$_
[
0
]
->
{
conf
}
->
{
ldapGroupAttributeNameSearch
}
),
# Push group attribute value for recursive search
(
$_
[
0
]
->
{
conf
}
->
{
ldapGroupRecursive
}
and
$_
[
0
]
->
{
conf
}
->
{
ldapGroupAttributeNameGroup
}
ne
"
dn
"
?
$_
[
0
]
->
{
conf
}
->
{
ldapGroupAttributeNameGroup
}
:
()
)
]
:
[]
;
my
$attributes
=
[]
;
@$attributes
=
split
(
/\s+/
,
$_
[
0
]
->
{
conf
}
->
{
ldapGroupAttributeNameSearch
}
)
if
$_
[
0
]
->
{
conf
}
->
{
ldapGroupAttributeNameSearch
};
push
(
@$attributes
,
$_
[
0
]
->
{
conf
}
->
{
ldapGroupAttributeNameGroup
}
)
if
(
$_
[
0
]
->
{
conf
}
->
{
ldapGroupRecursive
}
and
$_
[
0
]
->
{
conf
}
->
{
ldapGroupAttributeNameGroup
}
ne
"
dn
"
);
return
$attributes
;
}
);
...
...
@@ -122,13 +117,13 @@ sub setGroups {
my
$firstValue
=
$ldapGroups
->
{
$groupName
}
->
{
$_
}
->
[
0
];
push
@$groupValues
,
$firstValue
;
}
$groups
.=
$self
->
conf
->
{
multiValuesSeparator
}
.
join
(
'
|
',
@$groupValues
);
$groups
.=
$self
->
conf
->
{
multiValuesSeparator
}
if
$groups
;
$groups
.
=
join
(
'
|
',
@$groupValues
);
}
}
$req
->
{
sessionInfo
}
->
{
groups
}
=
$groups
;
$req
->
{
sessionInfo
}
->
{
groups
}
=
$groups
;
$req
->
{
sessionInfo
}
->
{
hGroups
}
=
$hGroups
;
PE_OK
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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