diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-04-04 14:06:13 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-04-04 14:08:24 +0200 |
commit | 51705da7a42b5a1a1028f6b4ced375ebf76a6d76 (patch) | |
tree | 80b65ea2f4c2aee7c0a7f57721ebfdf41ba22b26 | |
parent | 59d0e7711dc84d46b30fd7a66ec13d8207b87150 (diff) | |
download | nextcloud-server-51705da7a42b5a1a1028f6b4ced375ebf76a6d76.tar.gz nextcloud-server-51705da7a42b5a1a1028f6b4ced375ebf76a6d76.zip |
Log a warning when a user or group is mapped with a suffix
Most of the time, this is the result of a misconfiguration by the admin
and is not what is expected.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | apps/user_ldap/lib/Access.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 1cc0c62ff1d..d3510e7a398 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -589,6 +589,15 @@ class Access extends LDAPUtility { $altName = $this->createAltInternalOwnCloudName($intName, $isUser); if (is_string($altName)) { if ($this->mapAndAnnounceIfApplicable($mapper, $fdn, $altName, $uuid, $isUser)) { + $this->logger->warning( + 'Mapped {fdn} as {altName} because of a name collision on {intName}.', + [ + 'fdn' => $fdn, + 'altName' => $altName, + 'intName' => $intName, + 'app' => 'user_ldap', + ] + ); $newlyMapped = true; return $altName; } |