diff --git a/changelog/unreleased/enhancement-share-group-members b/changelog/unreleased/enhancement-share-group-members index 4b32bff3dbd..db89902d624 100644 --- a/changelog/unreleased/enhancement-share-group-members +++ b/changelog/unreleased/enhancement-share-group-members @@ -13,5 +13,7 @@ In detail it contains: * All users / groups who only have access on a share level inside a sub-resource of a space can not see all groups which are regular members of the space https://github.com/owncloud/web/pull/8161 +https://github.com/owncloud/web/pull/8300 https://github.com/owncloud/web/issues/8160 https://github.com/owncloud/web/issues/8177 +https://github.com/owncloud/web/issues/8299 diff --git a/packages/web-runtime/src/store/spaces.ts b/packages/web-runtime/src/store/spaces.ts index dfea3f2cb67..f212d83b6de 100644 --- a/packages/web-runtime/src/store/spaces.ts +++ b/packages/web-runtime/src/store/spaces.ts @@ -88,8 +88,10 @@ const mutations = { state.spaceMembers = members }, UPSERT_SPACE_MEMBERS(state, member) { + // group shares don't have the name prop... distinguish by shareType + const checkAttr = member.collaborator.name ? 'name' : 'displayName' const memberIndex = state.spaceMembers.findIndex((s) => { - return member.id === s.id && member.collaborator.name === s.collaborator.name + return member.id === s.id && member.collaborator[checkAttr] === s.collaborator[checkAttr] }) if (memberIndex >= 0) { @@ -100,8 +102,10 @@ const mutations = { } }, REMOVE_SPACE_MEMBER(state, member) { + // group shares don't have the name prop... distinguish by shareType + const checkAttr = member.collaborator.name ? 'name' : 'displayName' state.spaceMembers = state.spaceMembers.filter( - (s) => member.id === s.id && member.collaborator.name !== s.collaborator.name + (s) => member.id === s.id && member.collaborator[checkAttr] !== s.collaborator[checkAttr] ) } }