0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-25 06:52:49 +01:00
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>
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 Rename almost all Ctx functions (#22071) 2022-12-10 10:46:31 +08:00
asymkey Supports wildcard protected branch (#20825) 2023-01-16 16:00:22 +08:00
attachment Add API management for issue/pull and comment attachments (#21783) 2022-12-09 14:35:56 +08:00
auth Fix group filter for ldap source sync (#22506) 2023-02-02 15:45:00 +08:00
automerge refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
context Support org/user level projects (#22235) 2023-01-20 19:42:33 +08:00
convert Fix pull request API field closed_at always being null (#22482) 2023-01-17 11:42:32 +00:00
cron Implement actions (#21937) 2023-01-31 09:45:19 +08:00
externalaccount Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
forms Add Conda package registry (#22262) 2023-02-01 12:30:39 -06:00
gitdiff Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue Webhooks: for issue close/reopen action, add commit ID that caused it (#22583) 2023-01-24 23:47:53 -05:00
lfs Use context parameter in models/git (#22367) 2023-01-09 11:50:54 +08:00
mailer fix permission check for creating comment while mail (#22524) 2023-01-28 17:28:55 +08:00
markup Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
migrations Prevent duplicate labels when importing more than 99 (#22591) 2023-01-24 19:44:55 +00:00
mirror Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
org Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
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 Add API management for issue/pull and comment attachments (#21783) 2022-12-09 14:35:56 +08:00
repository Implement actions (#21937) 2023-01-31 09:45:19 +08:00
task Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
user Unify hashing for avatar (#22289) 2023-01-02 22:46:39 +01:00
webhook Webhooks: for issue close/reopen action, add commit ID that caused it (#22583) 2023-01-24 23:47:53 -05:00
wiki Improve utils of slices (#22379) 2023-01-11 13:31:16 +08:00