feat(mount-provider): implement IPartialMountProvider#2378
Open
cristianscheid wants to merge 3 commits intomasterfrom
Open
feat(mount-provider): implement IPartialMountProvider#2378cristianscheid wants to merge 3 commits intomasterfrom
cristianscheid wants to merge 3 commits intomasterfrom
Conversation
provokateurin
requested changes
Mar 2, 2026
Contributor
Author
|
@provokateurin I've addressed your review comments and updated the PR description with new testing instructions. Thanks! |
provokateurin
requested changes
Mar 3, 2026
Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
…single query Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
…s function Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
a1632ed to
ce45026
Compare
Contributor
Author
|
@provokateurin @salmart-dev I've adjusted the PR after your suggestions. Would appreciate another review when you have a chance. |
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.
Summary
Implemented
IPartialMountProviderinCircleMountProviderby addinggetMountsForPath()and addedlimitToMountpoint()toCoreQueryBuilderto support filtering.Testing
To test this implementation, I did the following:
if (!$this->configService->isLocalInstance($event->getOrigin()))condition inlib/FederatedItems/Files/FileShare::manage()to allow mount entries to be created locallymock_team_1,mock_team_2andmock_team_3mock_folder_1,mock_folder_2andmock_folder_3and shared with their respective folders (mock_team_1,mock_team_2andmock_team_3)returninlib/AppInfo/Application::registerMountProvider()to force registration ofCircleMountProviderregardless of GlobalScale availabilitycircles/lib/MountManager/CircleMountProvider::getMountsForUser(), accessednextcloud.local/index.php/apps/dashboard/, triggering thegetMountsForUser()methodgetMountsForPath()directly:Results
forChildrenwas set to false. With multiple folders on my setup (mock_team_1,mock_team_2andmock_team_3), in the test above only the requested mounts that exist in the DB were returned for the given paths when callinggetForUser()insidegetMountsForPath(), confirming thatlimitToMountpoints()is filtering correctly at the database level.forChildrendid not work as expected when set to true. During testing, circles always stored mountpoints relatively. For example, sharing a folder created insidemock_foldergenerated acircles_mountentry with mountpoint/mock_subfolderinstead of/mock_folder/mock_subfolder. As a result, theLIKE '/mock_folder/%'filter used whenforChildrenis true will not match these entries.generateCircleMount()threw an exception in both the originalgetMountsForUser()and on new methodgetMountsForPath(). I believe this happened because the mount entries were artificially created by bypassing the remote instance check inFileShare::manage(), resulting in incomplete data compared to what would be present in a real GlobalScale environment.Checklist
3. to review, feature component)stable32)AI (if applicable)