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

[full-ci] Indirect links should not be editable #6980

Merged
merged 1 commit into from
May 16, 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Indirect links should not be editable

We've fixed a bug where it was possible to edit an
indirect link.

https://github.com/owncloud/web/issues/6964
https://github.com/owncloud/web/pull/6980
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<details-and-edit
:is-folder-share="highlightedFile.isFolder"
:link="link"
:modifiable="canEdit"
:modifiable="canEdit && !isLinkIndirect(link)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't :modifiable="canEdit && !link.indirect already do the same without the additional method? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, let me open a quick PR bumping deps and simplifying this

:can-rename="true"
:password-enforced="passwordEnforced"
:expiration-date="globalExpirationDate"
Expand Down Expand Up @@ -301,7 +301,6 @@ export default defineComponent({
})
}
})

return allShares.sort(this.linksComparator)
},

Expand Down Expand Up @@ -341,6 +340,10 @@ export default defineComponent({
this.linkListCollapsed = !this.linkListCollapsed
},

isLinkIndirect(link) {
return this.indirectLinks.some((i) => i.token === link.token)
},

reloadLinks() {
this.loadCurrentFileOutgoingShares({
client: this.$client,
Expand Down