feat(dav): expose Nextcloud groups to Contact's system addressbook contacts#40997
Open
feat(dav): expose Nextcloud groups to Contact's system addressbook contacts#40997
Conversation
3ff1d95 to
bd16299
Compare
ChristophWurst
requested changes
Oct 20, 2023
Member
ChristophWurst
left a comment
There was a problem hiding this comment.
Data exposure of groups others are members of needs to be discussed/approved first: #38432
89b158d to
ef01811
Compare
…ntacts And move event listeners related to SyncService to proper ones Note: Changes to user system addressbook cards are now always done in a QueuedJob Closes #38432 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
ef01811 to
7d6fdda
Compare
| $groupsToInclude = explode(',', $this->config->getAppValue(Application::APP_ID, 'system_addressbook_groups_to_include', '')); | ||
| $groupsToIgnore = explode(',', $this->config->getAppValue(Application::APP_ID, 'system_addressbook_groups_to_ignore', '')); | ||
| $groupNames = array_reduce($this->groupManager->getUserGroups($user), function ($groupNames, IGroup $group) use ($groupsToInclude, $groupsToIgnore) { | ||
| if (!in_array($group->getGID(), $groupsToIgnore, true) && (empty($groupsToInclude) || in_array($group->getGID(), $groupsToInclude, true))) { |
Check notice
Code scanning / Psalm
DocblockTypeContradiction
Merged
Merged
ChristophWurst
approved these changes
Nov 7, 2023
Member
ChristophWurst
left a comment
There was a problem hiding this comment.
👍 if this is an opt-in feature
Code looks clean ✨
| if ($this->config->getAppValue(Application::APP_ID, 'system_addressbook_expose_groups', 'no') === 'yes') { | ||
| $groupsToInclude = explode(',', $this->config->getAppValue(Application::APP_ID, 'system_addressbook_groups_to_include', '')); | ||
| $groupsToIgnore = explode(',', $this->config->getAppValue(Application::APP_ID, 'system_addressbook_groups_to_ignore', '')); | ||
| $groupNames = array_reduce($this->groupManager->getUserGroups($user), function ($groupNames, IGroup $group) use ($groupsToInclude, $groupsToIgnore) { |
Member
There was a problem hiding this comment.
I might be wrong but this could be a use case for https://www.php.net/manual/en/function.array-intersect.php
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * @copyright 2022 Thomas Citharel <nextcloud@tcit.fr> |
Member
There was a problem hiding this comment.
if you wait a little longer you can skip setting your IDE to 2023
Merged
Merged
This was referenced Aug 22, 2025
Merged
Merged
Merged
Merged
Merged
This was referenced Sep 25, 2025
Merged
Merged
Merged
This was referenced Jan 29, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #38432
And move event listeners related to SyncService to proper ones
Note: Changes to user system addressbook cards are now always done in a QueuedJob
TODO
adminChecklist