1
0
mirror of https://github.com/owncloud/ocis.git synced 2026-10-23 23:29:02 +03:00
Files
ocis/services/groups
Roman Perekhod 703bbe1113 fix: [OCISDEV-1523] fix the LDAP master-ID filter for an empty base filter (#13100)
* fix: [OCISDEV-1523] fix the LDAP master-ID filter for an empty base filter

EnhanceFilterWithMasterID replaced an empty LDAP filter with a master-ID-only
filter. This action restricted an unrestricted search to master-ID users
only. The bug broke the cross-instance user search in multi-instance
deployments. The function now keeps an empty filter unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix: [OCISDEV-1523] require an explicit LDAP user filter with a master ID

EnhanceFilterWithMasterID in ocis-pkg/ldap/filter.go now keeps an empty
LDAP filter unchanged instead of restricting it to master-ID users only.
The auth-basic, users, groups, and graph services reuse this function to
compute their default LDAP user filter at startup.

An unset filter now means these services resolve or authenticate every
user in the shared LDAP directory, not only master-ID users. This action
is a behavior change for a deployment that sets
OCIS_MULTI_INSTANCE_MASTER_ID without an explicit OCIS_LDAP_USER_FILTER.

Each service now rejects startup when OCIS_MULTI_INSTANCE_MASTER_ID is
set and its own user filter is empty. This action keeps a multi-instance
deployment scoped to its own users by default.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* refactor: [OCISDEV-1523] simplify EnhanceFilterWithMasterID guard clauses

The function collapses three early-return guards into one condition.
This action removes a duplicated rationale comment between filter.go
and filter_test.go.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* docs: [OCISDEV-1523] point the changelog entry at the master backport PR

The changelog entry pointed at PR 13096, the stable-8.2 backport. This
commit points the entry at the master-branch PR number instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-09 15:27:27 +02:00
..
…