mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 00:05:21 +01:00
fix unable to change owner to someone else
This commit is contained in:
parent
6a34a35585
commit
e373ca7bdc
1 changed files with 4 additions and 4 deletions
|
|
@ -676,8 +676,8 @@ export class DocumentDetailComponent
|
||||||
get userIsOwner(): boolean {
|
get userIsOwner(): boolean {
|
||||||
let doc: PaperlessDocument = Object.assign({}, this.document)
|
let doc: PaperlessDocument = Object.assign({}, this.document)
|
||||||
// dont disable while editing
|
// dont disable while editing
|
||||||
if (this.document && this.store?.value.owner) {
|
if (this.document && this.store?.value.permissions_form?.owner) {
|
||||||
doc.owner = this.store?.value.owner
|
doc.owner = this.store?.value.permissions_form?.owner
|
||||||
}
|
}
|
||||||
return !this.document || this.permissionsService.currentUserOwnsObject(doc)
|
return !this.document || this.permissionsService.currentUserOwnsObject(doc)
|
||||||
}
|
}
|
||||||
|
|
@ -685,8 +685,8 @@ export class DocumentDetailComponent
|
||||||
get userCanEdit(): boolean {
|
get userCanEdit(): boolean {
|
||||||
let doc: PaperlessDocument = Object.assign({}, this.document)
|
let doc: PaperlessDocument = Object.assign({}, this.document)
|
||||||
// dont disable while editing
|
// dont disable while editing
|
||||||
if (this.document && this.store?.value.owner) {
|
if (this.document && this.store?.value.permissions_form?.owner) {
|
||||||
doc.owner = this.store?.value.owner
|
doc.owner = this.store?.value.permissions_form?.owner
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
!this.document ||
|
!this.document ||
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue