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.
gitea/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>
2 years ago
..
actions Add more events details supports for actions (#22680) 2 years ago
agit Rename almost all Ctx functions (#22071) 2 years ago
asymkey Supports wildcard protected branch (#20825) 2 years ago
attachment Add API management for issue/pull and comment attachments (#21783) 2 years ago
auth Fix group filter for ldap source sync (#22506) 2 years ago
automerge refactor some functions to support ctx as first parameter (#21878) 2 years ago
context Support org/user level projects (#22235) 2 years ago
convert Fix pull request API field `closed_at` always being `null` (#22482) 2 years ago
cron Implement actions (#21937) 2 years ago
externalaccount Implement FSFE REUSE for golang files (#21840) 2 years ago
forms Add Conda package registry (#22262) 2 years ago
gitdiff Implement FSFE REUSE for golang files (#21840) 2 years ago
issue Webhooks: for issue close/reopen action, add commit ID that caused it (#22583) 2 years ago
lfs Use context parameter in models/git (#22367) 2 years ago
mailer fix permission check for creating comment while mail (#22524) 2 years ago
markup Implement FSFE REUSE for golang files (#21840) 2 years ago
migrations Prevent duplicate labels when importing more than 99 (#22591) 2 years ago
mirror Implement FSFE REUSE for golang files (#21840) 2 years ago
org Implement FSFE REUSE for golang files (#21840) 2 years ago
packages Add Conda package registry (#22262) 2 years ago
pull Small refactor for loading PRs (#22652) 2 years ago
release Add API management for issue/pull and comment attachments (#21783) 2 years ago
repository Implement actions (#21937) 2 years ago
task Implement FSFE REUSE for golang files (#21840) 2 years ago
user Unify hashing for avatar (#22289) 2 years ago
webhook Webhooks: for issue close/reopen action, add commit ID that caused it (#22583) 2 years ago
wiki Improve utils of slices (#22379) 2 years ago