wip: e2e tests

This commit is contained in:
Mo
2023-05-22 09:16:14 -05:00
parent 5cf0617403
commit bb632cabd3
@@ -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