Allow only sync users from a group#3202
Open
weilai-irl wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces an admin-configurable “user sync group filter” so user synchronization (and photo/timezone sync) can be restricted to members of a specific Microsoft 365 group, and enhances photo sync efficiency by hashing batch-fetched photos to avoid unnecessary updates.
Changes:
- Added an “User sync group filter” admin setting (GUID) and wiring to drive user sync batching from
/groups/{id}/members. - Updated user sync / photo+timezone sync tasks to surface group-filter info in logs and to apply group membership filtering.
- Extended photo batch API responses with a SHA-256 hash and updated photo-apply logic to skip writes when hashes match.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
local/o365/settings.php |
Registers the new admin setting for the group filter under user sync settings. |
local/o365/lang/en/local_o365.php |
Adds UI strings for the new setting (label/description/validation string). |
local/o365/classes/task/usersync.php |
Logs group filter status and adjusts displayed sync options list. |
local/o365/classes/task/photoandtimezonesync.php |
Applies group filtering to photo/timezone sync processing and uses photo hash to reduce updates/log noise. |
local/o365/classes/rest/unified.php |
Adds batched group member processing APIs and includes photo hashes in batch responses. |
local/o365/classes/feature/usersync/main.php |
Routes user batching through group-member endpoints; adds optional photo-hash compare to skip reprocessing. |
local/o365/classes/adminsetting/usersyncgroupfilter.php |
Implements the validated configtext setting for GUID input. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8532915 to
5c842fb
Compare
5c842fb to
fc8e8f5
Compare
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.
No description provided.