A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Disable suggestions for read-only docs
shamoonae46ef7add40
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.tsindex 33a0d4114..8103cc374 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@@ -306,20 +306,27 @@ export class DocumentDetailComponent)},})- this.documentsService- .getSuggestions(doc.id)- .pipe(first())- .subscribe({- next: (result) => {- this.suggestions = result- },- error: (error) => {- this.suggestions = null- this.toastService.showError(- $localize`Error retrieving suggestions` + ': ' + error.toString()- )- },- })+ if (+ this.permissionsService.currentUserHasObjectPermissions(+ PermissionAction.Change,+ doc+ )+ ) {+ this.documentsService+ .getSuggestions(doc.id)+ .pipe(first())+ .subscribe({+ next: (result) => {+ this.suggestions = result+ },+ error: (error) => {+ this.suggestions = null+ this.toastService.showError(+ $localize`Error retrieving suggestions` + ': ' + error.toString()+ )+ },+ })+ }this.title = this.documentTitlePipe.transform(doc.title)const docFormValues = Object.assign({}, doc)docFormValues['permissions_form'] = {