Fix: shared gallery person management (allows operations with correct WebDAV permissions)#1627
Draft
jacksbox-cassandra wants to merge 3 commits intopulsejet:masterfrom
Draft
Conversation
- Add canManagePersonCluster helper function to check if current user can manage face clusters based on shared folder permissions - Update FaceEditModal, FaceMoveModal, FaceMergeModal, and SelectionManager to use the new permission check instead of strict ownership check - Allows users to rename, move, and merge face clusters in shared galleries when they have appropriate folder permissions Fixes: pulsejet#290
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.
Fix shared gallery person management permissions
Problem
Users cannot manage face clusters (rename, move, merge faces) for photos uploaded by other users in shared galleries, even when they have full permissions to the shared folder.
Error message: "Only user '{user}' can update this person"
This prevents collaborative face organization in shared family or group galleries.
Root Cause
The frontend components had strict ownership checks (
this.user !== utils.uid) that blocked all face management operations on clusters belonging to other users, regardless of shared folder permissions.Solution
canManagePersonCluster(personUserId)helper function that checks WebDAV permissionsChanges Made
New Permission Helper (
src/services/utils/helpers.ts):canManagePersonCluster()function using PROPFIND WebDAV requestsUpdated Components:
FaceEditModal.vue- Person renamingFaceMoveModal.vue- Moving faces between personsFaceMergeModal.vue- Merging face clustersSelectionManager.vue- Removing faces from personsTesting
Security Considerations
Fixes
Closes #290