mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-15 02:45:22 +00:00
37d3e0ec33
Backport #24050 by @sillyguodong In the `for` loop, the value of `membershipsToAdd[org]` and `membershipsToRemove[org]` is a slice that should be appended instead of overwritten. Due to the current overwrite, the LDAP group sync only matches the last group at the moment. ## Example reproduction - an LDAP user is both a member of `cn=admin_staff,ou=people,dc=planetexpress,dc=com` and `cn=ship_crew,ou=people,dc=planetexpress,dc=com`. - configuration of `Map LDAP groups to Organization teams ` in `Authentication Sources`: ```json { "cn=admin_staff,ou=people,dc=planetexpress,dc=com":{ "test_organization":[ "admin_staff", "test_add" ] }, "cn=ship_crew,ou=people,dc=planetexpress,dc=com":{ "test_organization":[ "ship_crew" ] } ``` - start `Synchronize external user data` task in the `Dashboard`. - the user was only added for the team `test_organization.ship_crew` Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com> |
||
---|---|---|
.. | ||
source | ||
auth.go | ||
auth_test.go | ||
basic.go | ||
group.go | ||
httpsign.go | ||
interface.go | ||
middleware.go | ||
oauth2.go | ||
reverseproxy.go | ||
session.go | ||
signin.go | ||
source.go | ||
sspi_windows.go | ||
sync.go |