From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 3 Mar 2023 23:52:28 +0000 (-0800) Subject: fix unable to change owner to someone else X-Git-Tag: v1.14.0-beta.rc1~13^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e373ca7bdc1a0d2e7a22acf4b0d15c0729cfd655;p=thirdparty%2Fpaperless-ngx.git fix unable to change owner to someone else --- diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index e154cd03bf..2038bd41e3 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -676,8 +676,8 @@ export class DocumentDetailComponent get userIsOwner(): boolean { let doc: PaperlessDocument = Object.assign({}, this.document) // dont disable while editing - if (this.document && this.store?.value.owner) { - doc.owner = this.store?.value.owner + if (this.document && this.store?.value.permissions_form?.owner) { + doc.owner = this.store?.value.permissions_form?.owner } return !this.document || this.permissionsService.currentUserOwnsObject(doc) } @@ -685,8 +685,8 @@ export class DocumentDetailComponent get userCanEdit(): boolean { let doc: PaperlessDocument = Object.assign({}, this.document) // dont disable while editing - if (this.document && this.store?.value.owner) { - doc.owner = this.store?.value.owner + if (this.document && this.store?.value.permissions_form?.owner) { + doc.owner = this.store?.value.permissions_form?.owner } return ( !this.document ||