mirror of
https://github.com/standardnotes/server
synced 2026-07-14 00:01:54 -04:00
wip: e2e tests
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user