diff options
author | sillyguodong <33891828+sillyguodong@users.noreply.github.com> | 2023-04-12 07:54:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 19:54:26 -0400 |
commit | 890d10c7c8e18275695cef97a920bbae060bf7d1 (patch) | |
tree | f62c9588e4985fa1d51b5d5a94f1252fa2783c88 /options/locale/locale_zh-CN.ini | |
parent | 6a4be2cb6a6193a3f41d5e08d05044e3c54efc38 (diff) | |
download | gitea-890d10c7c8e18275695cef97a920bbae060bf7d1.tar.gz gitea-890d10c7c8e18275695cef97a920bbae060bf7d1.zip |
Fix accidental overwriting of LDAP team memberships (#24050)
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`
Diffstat (limited to 'options/locale/locale_zh-CN.ini')
0 files changed, 0 insertions, 0 deletions