[stable30] fix(cardav): only show users from enabled addressBooks in contacts menu#51538
[stable30] fix(cardav): only show users from enabled addressBooks in contacts menu#51538ChristophWurst merged 1 commit intostable30from
Conversation
58303c5 to
031cf2f
Compare
|
|
||
| private function setupSystemContactsProvider(IContactsManager $contactsManager, | ||
| IAppContainer $container): void { | ||
| private function setupSystemContactsProvider(IContactsManager $contactsManager, IAppContainer $container): void { |
Check notice
Code scanning / Psalm
DeprecatedInterface Note
| } | ||
|
|
||
| $path = 'addressbooks/users/' . $user . '/' . $uri; | ||
| $properties = $this->propertyMapper->findPropertyByPathAndName($user, $path, '{http://owncloud.org/ns}enabled'); |
Check notice
Code scanning / Psalm
PossiblyInvalidArgument Note
| * @param IURLGenerator $urlGenerator | ||
| */ | ||
| public function setupSystemContactsProvider(IManager $cm, IURLGenerator $urlGenerator) { | ||
| public function setupSystemContactsProvider(IManager $cm, ?string $userId, IURLGenerator $urlGenerator) { |
Check notice
Code scanning / Psalm
MissingReturnType Note
| * @param ?string $userId | ||
| */ | ||
| private function register(IManager $cm, $addressBooks, $urlGenerator) { | ||
| private function register(IManager $cm, $addressBooks, $urlGenerator, ?string $userId) { |
Check notice
Code scanning / Psalm
MissingReturnType Note
| * @param ?string $userId | ||
| */ | ||
| private function register(IManager $cm, $addressBooks, $urlGenerator) { | ||
| private function register(IManager $cm, $addressBooks, $urlGenerator, ?string $userId) { |
Check notice
Code scanning / Psalm
MissingParamType Note
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
031cf2f to
e55a375
Compare
| } | ||
|
|
||
| public function isEnabled(): bool { | ||
| if (!$this->userId) { |
Check notice
Code scanning / Psalm
RiskyTruthyFalsyComparison Note
| $uri = $this->addressBookInfo['uri']; | ||
| } | ||
|
|
||
| $path = 'addressbooks/users/' . $user . '/' . $uri; |
Check notice
Code scanning / Psalm
PossiblyInvalidOperand Note
|
Cypress looks unrelated |
Backport of #51380
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.