]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix: Remove edit requirement for bulk email, show based on setting (#11149)
authorshamoon <4887959+shamoon@users.noreply.github.com>
Thu, 23 Oct 2025 12:50:27 +0000 (05:50 -0700)
committerGitHub <noreply@github.com>
Thu, 23 Oct 2025 12:50:27 +0000 (05:50 -0700)
src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html
src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts

index 5f0260529122c737dc767a072eab48d2c347efb4..2323929d1cc7cdb41c2309547d7ea27bae72c60a 100644 (file)
           <button ngbDropdownItem (click)="mergeSelected()" [disabled]="!userCanAdd || list.selected.size < 2">
             <i-bs name="journals"></i-bs>&nbsp;<ng-container i18n>Merge</ng-container>
           </button>
-          <button ngbDropdownItem (click)="emailSelected()" [disabled]="!userCanEdit">
-            <i-bs name="envelope"></i-bs>&nbsp;<ng-container i18n>Email</ng-container>
-          </button>
+          @if (emailEnabled) {
+            <button ngbDropdownItem (click)="emailSelected()">
+              <i-bs name="envelope"></i-bs>&nbsp;<ng-container i18n>Email</ng-container>
+            </button>
+          }
         </div>
       </div>
     </div>
index 49877b470b0f642b7f9aa57b03acb5009a639d93..4d66335fe5094a4a988c1cdb90c9f5115c82f811 100644 (file)
@@ -904,6 +904,10 @@ export class BulkEditorComponent
     })
   }
 
+  public get emailEnabled(): boolean {
+    return this.settings.get(SETTINGS_KEYS.EMAIL_ENABLED)
+  }
+
   emailSelected() {
     const allHaveArchiveVersion = this.list.documents
       .filter((d) => this.list.selected.has(d.id))