Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-LDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-LDAP
Merge requests
!13
Support LDAPSearchUnion now used in core
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Support LDAPSearchUnion now used in core
core-249-ldap-allow-multiple-search-bases-for-users-and-groups
into
master
Overview
1
Commits
2
Pipelines
1
Changes
1
Merged
Nik | Klampfradler
requested to merge
core-249-ldap-allow-multiple-search-bases-for-users-and-groups
into
master
4 years ago
Overview
1
Commits
2
Pipelines
1
Changes
1
Expand
Must be merged after AlekSIS!262.
Edited
4 years ago
by
Nik | Klampfradler
0
0
Merge request reports
Compare
master
version 1
423f4da7
4 years ago
master (base)
and
latest version
latest version
55d6298a
2 commits,
4 years ago
version 1
423f4da7
1 commit,
4 years ago
1 file
+
3
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
aleksis/apps/ldap/util/ldap_sync.py
+
3
−
3
Options
@@ -319,9 +319,9 @@ def mass_ldap_import():
group_dict
=
{
obj
.
ldap_dn
:
obj
for
obj
in
group_objects
}
# Guess LDAP username field from user filter
uid_field
=
re
.
search
(
r
"
([a-zA-Z]+)=%\(user\)s
"
,
backend
.
settings
.
USER_SEARCH
.
filterstr
).
group
(
1
)
uid_field
=
re
.
search
(
r
"
([a-zA-Z]+)=%\(user\)s
"
,
backend
.
settings
.
USER_SEARCH
.
searches
[
0
].
filterstr
)
.
group
(
1
)
# Synchronise user data for all found users
ldap_users
=
backend
.
settings
.
USER_SEARCH
.
execute
(
connection
,
{
"
user
"
:
"
*
"
},
escape
=
False
)
Loading