You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/services
sillyguodong 890d10c7c8
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`
1 year ago
..
actions Use actions job link as commit status URL instead of run link (#24023) 1 year ago
agit add user rename endpoint to admin api (#22789) 1 year ago
asymkey Add context cache as a request level cache (#22294) 1 year ago
attachment Preserve file size when creating attachments (#23406) 1 year ago
auth Fix accidental overwriting of LDAP team memberships (#24050) 1 year ago
automerge Add force_merge to merge request and fix checking mergable (#23010) 1 year ago
context Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823) 1 year ago
convert Add activity feeds API (#23494) 1 year ago
cron Add Cargo package registry (#21888) 1 year ago
externalaccount Implement FSFE REUSE for golang files (#21840) 2 years ago
forms Title can be empty when creating tag only (#23917) 1 year ago
gitdiff Fix broken code editor diff preview (#23307) 1 year ago
issue Webhooks: for issue close/reopen action, add commit ID that caused it (#22583) 1 year ago
lfs Check `IsActionsToken` for LFS authentication (#23841) 1 year ago
mailer Preserve file size when creating attachments (#23406) 1 year ago
markup Implement FSFE REUSE for golang files (#21840) 2 years ago
migrations Update github.com/google/go-github to v51 (#23946) 1 year ago
mirror Fill head commit to in payload when notifying push commits for mirroring (#23215) 1 year ago
org Implement FSFE REUSE for golang files (#21840) 2 years ago
packages Introduce path Clean/Join helper functions (#23495) 1 year ago
pull [Patch] Fix closed PR also triggers Webhooks and actions (#23782) 1 year ago
release Delete deleted release attachments immediately from storage (#23913) 1 year ago
repository Make label templates have consistent behavior and priority (#23749) 1 year ago
task Implement FSFE REUSE for golang files (#21840) 2 years ago
user add user rename endpoint to admin api (#22789) 1 year ago
webhook Fix incorrect `HookEventType` of pull request review comments (#23650) 1 year ago
wiki Improve utils of slices (#22379) 1 year ago