mirror of
https://github.com/nextcloud/server.git
synced 2026-11-26 16:15:53 +01:00
A web request that looked up a user or group before it was mapped stored the miss in the local cache for 30 days. Mapping it later from the CLI (occ ldap:search, the Sync job) does not touch that cache, so web requests kept treating it as unknown. Only found DNs are cached now, and a cached miss is ignored. Fixes #66003 Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
29 lines
758 B
PHP
29 lines
758 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
/**
|
|
* SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
namespace OCA\User_LDAP\Tests\Mapping;
|
|
|
|
use OCA\User_LDAP\Mapping\GroupMapping;
|
|
use OCP\IAppConfig;
|
|
use OCP\ICacheFactory;
|
|
use OCP\IDBConnection;
|
|
|
|
/**
|
|
* Class GroupMappingTest
|
|
*
|
|
*
|
|
* @package OCA\User_LDAP\Tests\Mapping
|
|
*/
|
|
#[\PHPUnit\Framework\Attributes\Group(name: 'DB')]
|
|
class GroupMappingTest extends AbstractMappingTestCase {
|
|
public function getMapper(IDBConnection $dbMock, ICacheFactory $cacheFactory, IAppConfig $appConfig, bool $isCLI = true): GroupMapping {
|
|
return new GroupMapping($dbMock, $cacheFactory, $appConfig, $isCLI);
|
|
}
|
|
}
|