diff --git a/packages/syncing-server/src/Domain/Item/SaveRule/OwnershipFilter.ts b/packages/syncing-server/src/Domain/Item/SaveRule/OwnershipFilter.ts index 2d213d6db..ba2955d0e 100644 --- a/packages/syncing-server/src/Domain/Item/SaveRule/OwnershipFilter.ts +++ b/packages/syncing-server/src/Domain/Item/SaveRule/OwnershipFilter.ts @@ -31,7 +31,6 @@ export class OwnershipFilter implements ItemSaveRuleInterface { if (itemBelongsToADifferentUser || isItemBeingSetForGroup || isItemBeingRemovedFromGroup) { const groupAuthorization = await this.groupAuthorizationForItem(dto.userUuid, dto.itemHash) - if (!groupAuthorization) { return failValue } @@ -44,6 +43,10 @@ export class OwnershipFilter implements ItemSaveRuleInterface { return groupAuthorization === 'admin' ? successValue : failValue } + if (dto.itemHash.content_type === ContentType.SharedItemsKey && groupAuthorization !== 'admin') { + return failValue + } + const usingValidKey = await this.groupItemIsBeingSavedWithValidItemsKey(dto.itemHash) return usingValidKey ? successValue : failValue