mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix: dont lose permissions ui if owner changed from null (#5433)
This commit is contained in:
		| @@ -861,8 +861,11 @@ export class DocumentDetailComponent | ||||
|   get userIsOwner(): boolean { | ||||
|     let doc: Document = Object.assign({}, this.document) | ||||
|     // dont disable while editing | ||||
|     if (this.document && this.store?.value.permissions_form?.owner) { | ||||
|       doc.owner = this.store?.value.permissions_form?.owner | ||||
|     if ( | ||||
|       this.document && | ||||
|       this.store?.value.permissions_form?.hasOwnProperty('owner') | ||||
|     ) { | ||||
|       doc.owner = this.store.value.permissions_form.owner | ||||
|     } | ||||
|     return !this.document || this.permissionsService.currentUserOwnsObject(doc) | ||||
|   } | ||||
| @@ -870,8 +873,11 @@ export class DocumentDetailComponent | ||||
|   get userCanEdit(): boolean { | ||||
|     let doc: Document = Object.assign({}, this.document) | ||||
|     // dont disable while editing | ||||
|     if (this.document && this.store?.value.permissions_form?.owner) { | ||||
|       doc.owner = this.store?.value.permissions_form?.owner | ||||
|     if ( | ||||
|       this.document && | ||||
|       this.store?.value.permissions_form?.hasOwnProperty('owner') | ||||
|     ) { | ||||
|       doc.owner = this.store.value.permissions_form.owner | ||||
|     } | ||||
|     return ( | ||||
|       !this.document || | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon