Skip to content

Commit

Permalink
Prevent share permissions from being exceeded (#7317)
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen authored Jul 22, 2022
1 parent 009a265 commit 7afb13f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog/unreleased/enhancement-ocis-resharing
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ https://github.com/owncloud/web/pull/7086
https://github.com/owncloud/web/pull/7247
https://github.com/owncloud/web/issues/6894
https://github.com/owncloud/web/pull/7243
https://github.com/owncloud/web/pull/7317
https://github.com/owncloud/web/issues/7225
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default {
return SpacePeopleShareRoles.list()
}
if (this.resource.isReceivedShare() && this.resourceIsSharable && this.share) {
if (this.share?.incoming && this.resourceIsSharable) {
return PeopleShareRoles.filterByBitmask(
parseInt(this.share.permissions),
this.resource.isFolder,
Expand All @@ -179,7 +179,7 @@ export default {
return PeopleShareRoles.list(this.resource.isFolder, this.allowCustomSharing !== false)
},
availablePermissions() {
if (this.resource.isReceivedShare() && this.resourceIsSharable && this.share) {
if (this.share?.incoming && this.resourceIsSharable) {
return SharePermissions.bitmaskToPermissions(parseInt(this.share.permissions))
}
return this.customPermissionsRole.permissions(this.allowSharePermission)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export default defineComponent({
},
availableRoleOptions() {
if (this.highlightedFile.isReceivedShare() && this.canCreatePublicLinks && this.share) {
if (this.share?.incoming && this.canCreatePublicLinks) {
return LinkShareRoles.filterByBitmask(
parseInt(this.share.permissions),
this.highlightedFile.isFolder,
Expand Down

0 comments on commit 7afb13f

Please sign in to comment.