forgejo/services
Pavel Ezhov 98770d3db8
Fix group filter for ldap source sync (#22506)
There are 2 separate flows of creating a user: authentication and source
sync.
When a group filter is defined, source sync ignores group filter, while
authentication respects it.
With this PR I've fixed this behavior, so both flows now apply this
filter when searching users in LDAP in a unified way.

- Unified LDAP group membership lookup for authentication and source
sync flows
- Replaced custom group membership lookup (used for authentication flow)
with an existing listLdapGroupMemberships method (used for source sync
flow)
- Modified listLdapGroupMemberships and getUserAttributeListedInGroup in
a way group lookup could be called separately
- Added user filtering based on a group membership for a source sync
- Added tests to cover this logic

Co-authored-by: Pavel Ezhov <paejov@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-02-02 15:45:00 +08:00
..
actions Add more events details supports for actions (#22680) 2023-02-01 13:32:46 +08:00
agit
asymkey
attachment
auth Fix group filter for ldap source sync (#22506) 2023-02-02 15:45:00 +08:00
automerge
context Support org/user level projects (#22235) 2023-01-20 19:42:33 +08:00
convert
cron Implement actions (#21937) 2023-01-31 09:45:19 +08:00
externalaccount
forms Add Conda package registry (#22262) 2023-02-01 12:30:39 -06:00
gitdiff
issue Webhooks: for issue close/reopen action, add commit ID that caused it (#22583) 2023-01-24 23:47:53 -05:00
lfs
mailer fix permission check for creating comment while mail (#22524) 2023-01-28 17:28:55 +08:00
markup
migrations Prevent duplicate labels when importing more than 99 (#22591) 2023-01-24 19:44:55 +00:00
mirror
org
packages Add Conda package registry (#22262) 2023-02-01 12:30:39 -06:00
pull Small refactor for loading PRs (#22652) 2023-02-01 21:49:28 -06:00
release
repository Implement actions (#21937) 2023-01-31 09:45:19 +08:00
task
user
webhook Webhooks: for issue close/reopen action, add commit ID that caused it (#22583) 2023-01-24 23:47:53 -05:00
wiki