Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove share type filter for project spaces #11653

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Hide share type switch for project spaces

We've hidden the share type switch when adding members to project spaces because they currently don't support external shares.

https://github.com/owncloud/web/pull/11653
https://github.com/owncloud/web/issues/11579
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
size="small"
/>
<oc-filter-chip
v-if="shareRoleTypes.length > 1"
v-if="showShareTypeFilter"
:filter-label="currentShareRoleType.label"
class="invite-form-share-role-type"
raw
Expand Down Expand Up @@ -495,6 +495,10 @@ export default defineComponent({
return $gettext('No users or groups found.')
})

const showShareTypeFilter = computed(
() => unref(shareRoleTypes).length > 1 && !isProjectSpaceResource(unref(resource))
)

return {
minSearchLength: capabilityRefs.sharingSearchMinLength,
isRunningOnEos: computed(() => configStore.options.runningOnEos),
Expand All @@ -519,6 +523,7 @@ export default defineComponent({
focusShareInput,
noOptionsLabel,
DateTime,
showShareTypeFilter,

// CERN
accountType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ describe('InviteCollaboratorForm', () => {
const roleDropdown = wrapper.findComponent<typeof RoleDropdown>('role-dropdown-stub')
expect(roleDropdown.props('isExternal')).toBeTruthy()
})
it('is not present for project space resources', () => {
const space = mock<SpaceResource>({ driveType: 'project' })
const externalRoles = [mock<ShareRole>()]
const { wrapper } = getWrapper({ externalShareRoles: externalRoles, resource: space })

expect(wrapper.find('.invite-form-share-role-type').exists()).toBeFalsy()
})
})
})

Expand Down