[stable29] fix(cardav): only show users from enabled addressBooks in contacts menu#51537
[stable29] fix(cardav): only show users from enabled addressBooks in contacts menu#51537
Conversation
3f98715 to
0f1ff70
Compare
0f1ff70 to
6c39f7d
Compare
|
|
||
| private function setupSystemContactsProvider(IContactsManager $contactsManager, | ||
| IAppContainer $container): void { | ||
| private function setupSystemContactsProvider(IContactsManager $contactsManager, IAppContainer $container): void { |
Check notice
Code scanning / Psalm
DeprecatedInterface 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
6c39f7d to
4f44398
Compare
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
| } | ||
|
|
||
| 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
| } | ||
|
|
||
| $path = 'addressbooks/users/' . $user . '/' . $uri; | ||
| $properties = $this->propertyMapper->findPropertyByPathAndName($user, $path, '{http://owncloud.org/ns}enabled'); |
Check notice
Code scanning / Psalm
PossiblyInvalidArgument Note
4f44398 to
408c4bf
Compare
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.