1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-22 19:25:47 +00:00
gitea/tests
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
..
e2e Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
fuzz Move fuzz tests into tests/fuzz (#22376) 2023-01-09 15:30:14 +08:00
gitea-lfs-meta Test views of LFS files (#22196) 2022-12-23 07:41:56 +08:00
gitea-repositories-meta Test views of LFS files (#22196) 2022-12-23 07:41:56 +08:00
integration Fix group filter for ldap source sync (#22506) 2023-02-02 15:45:00 +08:00
mssql.ini.tmpl Kd/ci playwright go test (#20123) 2022-09-02 15:18:23 -04:00
mysql.ini.tmpl Disable test for incoming email (#22686) 2023-01-31 14:56:22 +01:00
mysql8.ini.tmpl Kd/ci playwright go test (#20123) 2022-09-02 15:18:23 -04:00
pgsql.ini.tmpl Kd/ci playwright go test (#20123) 2022-09-02 15:18:23 -04:00
sqlite.ini.tmpl Add a simple test for external renderer (#20033) 2022-12-12 20:45:21 +08:00
test_utils.go Test views of LFS files (#22196) 2022-12-23 07:41:56 +08:00
testlogger.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00