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

Use id as fileId in space resource entities #7294

Merged
merged 1 commit into from
Jul 19, 2022
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
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-personal-shares-in-project-space
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Personal shares leaked into project space

Due to a bug in how we handle spaces as resources internally we loaded personal shares when listing project space shares.

https://github.com/owncloud/web/issues/7268
https://github.com/owncloud/web/pull/7294
18 changes: 0 additions & 18 deletions packages/web-app-files/src/components/SideBar/Shares/FileLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
</div>
</template>
<script lang="ts">
import { dirname } from 'path'
import { defineComponent } from '@vue/composition-api'
import { DateTime } from 'luxon'
import { mapGetters, mapActions, mapState } from 'vuex'
Expand Down Expand Up @@ -375,23 +374,6 @@ export default defineComponent({
this.indirectLinkListCollapsed = !this.indirectLinkListCollapsed
},

reloadLinks() {
this.loadCurrentFileOutgoingShares({
client: this.$client,
graphClient: this.graphClient,
path: this.highlightedFile.path,
$gettext: this.$gettext,
...(this.currentStorageId && { storageId: this.currentStorageId }),
resource: this.highlightedFile
})
this.loadSharesTree({
client: this.$client,
path: this.highlightedFile.path === '' ? '/' : dirname(this.highlightedFile.path),
$gettext: this.$gettext,
...(this.currentStorageId && { storageId: this.currentStorageId })
})
},

isPasswordEnforcedFor(link) {
const currentRole = LinkShareRoles.getByBitmask(
parseInt(link.permissions),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export default defineComponent({
...useGraphClient()
}
},
computed: {
...mapGetters('Files', ['highlightedFile'])
},
watch: {
highlightedFile: {
handler: function (newItem, oldItem) {
Expand All @@ -45,9 +48,6 @@ export default defineComponent({
immediate: true
}
},
computed: {
...mapGetters('Files', ['highlightedFile'])
},
methods: {
...mapActions('Files', [
'loadCurrentFileOutgoingShares',
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/helpers/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function buildSpace(space) {
}
return {
id: space.id,
fileId: '',
fileId: space.id,
storageId: space.id,
mimeType: '',
name: space.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export class FolderLoaderSpacesProject implements FolderLoader {
const hasShareJail = useCapabilityShareJailEnabled(store)
yield store.dispatch('Files/loadSharesTree', {
client: clientService.owncloudSdk,
path: currentFolder.path
path: currentFolder.path,
storageId: space.fileId
})

for (const file of resources) {
Expand Down