diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index c0fe2eba2..20b9c933a 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -594,10 +594,6 @@ src/app/components/document-detail/document-detail.component.html 341 - - src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.html - 79 - src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html 21 @@ -1086,7 +1082,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.ts - 153 + 152 @@ -1165,7 +1161,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 104 + 101 src/app/components/document-list/filter-editor/filter-editor.component.html @@ -1454,10 +1450,6 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html 4 - - src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.html - 77 - src/app/components/document-list/save-view-config-dialog/save-view-config-dialog.component.html 20 @@ -1592,7 +1584,7 @@ src/app/components/admin/tasks/tasks.component.ts - 31 + 30 src/app/components/admin/trash/trash.component.html @@ -1764,7 +1756,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 110 + 107 src/app/components/manage/custom-fields/custom-fields.component.html @@ -1818,7 +1810,7 @@ src/app/components/admin/tasks/tasks.component.ts - 129 + 122 @@ -1874,63 +1866,63 @@ Result src/app/components/admin/tasks/tasks.component.ts - 32 + 31 Dismiss selected src/app/components/admin/tasks/tasks.component.ts - 76 + 75 Dismiss all src/app/components/admin/tasks/tasks.component.ts - 77 + 76 Confirm Dismiss All src/app/components/admin/tasks/tasks.component.ts - 126 + 119 Dismiss all tasks? src/app/components/admin/tasks/tasks.component.ts - 127 + 120 queued src/app/components/admin/tasks/tasks.component.ts - 212 + 205 started src/app/components/admin/tasks/tasks.component.ts - 214 + 207 completed src/app/components/admin/tasks/tasks.component.ts - 216 + 209 failed src/app/components/admin/tasks/tasks.component.ts - 218 + 211 @@ -2057,7 +2049,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 164 + 161 src/app/components/manage/custom-fields/custom-fields.component.html @@ -2235,7 +2227,7 @@ src/app/components/document-detail/document-detail.component.ts - 856 + 860 @@ -2512,31 +2504,31 @@ src/app/components/document-detail/document-detail.component.ts - 880 + 884 src/app/components/document-detail/document-detail.component.ts - 1180 + 1191 src/app/components/document-detail/document-detail.component.ts - 1219 + 1230 src/app/components/document-detail/document-detail.component.ts - 1260 + 1271 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 759 + 772 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 792 + 805 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 811 + 824 src/app/components/manage/custom-fields/custom-fields.component.ts @@ -2961,7 +2953,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 136 + 133 src/app/components/document-list/document-card-large/document-card-large.component.html @@ -3118,31 +3110,31 @@ src/app/components/document-detail/document-detail.component.ts - 833 + 837 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 402 + 415 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 442 + 455 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 480 + 493 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 518 + 531 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 580 + 593 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 713 + 726 @@ -4955,7 +4947,7 @@ Click again to exclude items. src/app/components/common/filterable-dropdown/filterable-dropdown.component.html - 77 + 71 @@ -4970,7 +4962,7 @@ Open filter src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts - 494 + 488 @@ -5177,7 +5169,7 @@ src/app/components/document-list/document-card-small/document-card-small.component.ts - 89 + 79 @@ -6104,7 +6096,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 347 + 360 this string is used to separate processing, failed and added on the file upload widget @@ -6179,7 +6171,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 114 + 111 @@ -6208,7 +6200,7 @@ src/app/components/document-list/bulk-editor/bulk-editor.component.html - 117 + 114 @@ -6226,7 +6218,7 @@ src/app/components/document-detail/document-detail.component.ts - 1237 + 1248 src/app/guards/dirty-saved-view.guard.ts @@ -6259,7 +6251,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.ts - 141 + 140 src/app/data/document.ts @@ -6594,203 +6586,203 @@ Error retrieving suggestions. src/app/components/document-detail/document-detail.component.ts - 596 + 600 Document saved successfully. src/app/components/document-detail/document-detail.component.ts - 747 + 751 src/app/components/document-detail/document-detail.component.ts - 761 + 765 Error saving document src/app/components/document-detail/document-detail.component.ts - 765 + 769 src/app/components/document-detail/document-detail.component.ts - 806 + 810 Do you really want to move the document "" to the trash? src/app/components/document-detail/document-detail.component.ts - 834 + 838 Documents can be restored prior to permanent deletion. src/app/components/document-detail/document-detail.component.ts - 835 + 839 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 715 + 728 Move to trash src/app/components/document-detail/document-detail.component.ts - 837 + 841 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 717 + 730 Reprocess confirm src/app/components/document-detail/document-detail.component.ts - 876 + 880 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 755 + 768 This operation will permanently recreate the archive file for this document. src/app/components/document-detail/document-detail.component.ts - 877 + 881 The archive file will be re-generated with the current settings. src/app/components/document-detail/document-detail.component.ts - 878 + 882 Reprocess operation will begin in the background. Close and re-open or reload this document after the operation has completed to see new content. src/app/components/document-detail/document-detail.component.ts - 888 + 892 Error executing operation src/app/components/document-detail/document-detail.component.ts - 899 + 903 Page Fit src/app/components/document-detail/document-detail.component.ts - 972 + 976 Split confirm src/app/components/document-detail/document-detail.component.ts - 1178 + 1189 This operation will split the selected document(s) into new documents. src/app/components/document-detail/document-detail.component.ts - 1179 + 1190 Split operation will begin in the background. src/app/components/document-detail/document-detail.component.ts - 1195 + 1206 Error executing split operation src/app/components/document-detail/document-detail.component.ts - 1204 + 1215 Rotate confirm src/app/components/document-detail/document-detail.component.ts - 1217 + 1228 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 789 + 802 This operation will permanently rotate the original version of the current document. src/app/components/document-detail/document-detail.component.ts - 1218 + 1229 Rotation will begin in the background. Close and re-open the document after the operation has completed to see the changes. src/app/components/document-detail/document-detail.component.ts - 1234 + 1245 Error executing rotate operation src/app/components/document-detail/document-detail.component.ts - 1246 + 1257 Delete pages confirm src/app/components/document-detail/document-detail.component.ts - 1258 + 1269 This operation will permanently delete the selected pages from the original document. src/app/components/document-detail/document-detail.component.ts - 1259 + 1270 Delete pages operation will begin in the background. Close and re-open or reload this document after the operation has completed to see the changes. src/app/components/document-detail/document-detail.component.ts - 1274 + 1285 Error executing delete pages operation src/app/components/document-detail/document-detail.component.ts - 1283 + 1294 An error occurred loading tiff: src/app/components/document-detail/document-detail.component.ts - 1323 + 1334 src/app/components/document-detail/document-detail.component.ts - 1327 + 1338 @@ -6870,7 +6862,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.ts - 149 + 148 @@ -6880,75 +6872,64 @@ 83 - - Set values - - src/app/components/document-list/bulk-editor/bulk-editor.component.html - 93 - - Merge src/app/components/document-list/bulk-editor/bulk-editor.component.html - 120 + 117 Include: src/app/components/document-list/bulk-editor/bulk-editor.component.html - 142 + 139 Archived files src/app/components/document-list/bulk-editor/bulk-editor.component.html - 146 + 143 Original files src/app/components/document-list/bulk-editor/bulk-editor.component.html - 150 + 147 Use formatted filename src/app/components/document-list/bulk-editor/bulk-editor.component.html - 155 + 152 Error executing bulk operation src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 251 - - - src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 859 + 264 "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 339 + 352 src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 345 + 358 "" and "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 341 + 354 This is for messages like 'modify "tag1" and "tag2"' @@ -6956,7 +6937,7 @@ and "" src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 349,351 + 362,364 this is for messages like 'modify "tag1", "tag2" and "tag3"' @@ -6964,14 +6945,14 @@ Confirm tags assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 366 + 379 This operation will add the tag "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 372 + 385 @@ -6980,14 +6961,14 @@ )"/> to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 377,379 + 390,392 This operation will remove the tag "" from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 385 + 398 @@ -6996,7 +6977,7 @@ )"/> from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 390,392 + 403,405 @@ -7007,84 +6988,84 @@ )"/> on selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 394,398 + 407,411 Confirm correspondent assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 435 + 448 This operation will assign the correspondent "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 437 + 450 This operation will remove the correspondent from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 439 + 452 Confirm document type assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 473 + 486 This operation will assign the document type "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 475 + 488 This operation will remove the document type from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 477 + 490 Confirm storage path assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 511 + 524 This operation will assign the storage path "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 513 + 526 This operation will remove the storage path from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 515 + 528 Confirm custom field assignment src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 544 + 557 This operation will assign the custom field "" to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 550 + 563 @@ -7093,14 +7074,14 @@ )"/> to selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 555,557 + 568,570 This operation will remove the custom field "" from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 563 + 576 @@ -7109,7 +7090,7 @@ )"/> from selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 568,570 + 581,583 @@ -7120,85 +7101,56 @@ )"/> on selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 572,576 + 585,589 Move selected document(s) to the trash? src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 714 + 727 This operation will permanently recreate the archive files for selected document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 756 + 769 The archive files will be re-generated with the current settings. src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 757 + 770 This operation will permanently rotate the original version of document(s). src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 790 + 803 Merge confirm src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 809 + 822 This operation will merge selected documents into a new document. src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 810 + 823 Merged document will be queued for consumption. src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 826 - - - - Bulk operation executed successfully - - src/app/components/document-list/bulk-editor/bulk-editor.component.ts - 849 - - - - {VAR_PLURAL, plural, =1 {Set custom fields for 1 document} other {Set custom fields for documents}} - - src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.html - 3,7 - - - - Select custom fields - - src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.html - 13 - - - - {VAR_PLURAL, plural, =1 {This operation will also remove 1 custom field from the selected documents.} other {This operation will also - remove custom fields from the selected documents.}} - - src/app/components/document-list/bulk-editor/custom-fields-bulk-edit-dialog/custom-fields-bulk-edit-dialog.component.html - 69,74 + 839 @@ -7458,7 +7410,7 @@ src/app/components/document-list/filter-editor/filter-editor.component.ts - 146 + 145 src/app/data/document.ts @@ -7662,147 +7614,147 @@ Title & content src/app/components/document-list/filter-editor/filter-editor.component.ts - 144 + 143 More like src/app/components/document-list/filter-editor/filter-editor.component.ts - 159 + 158 equals src/app/components/document-list/filter-editor/filter-editor.component.ts - 165 + 164 is empty src/app/components/document-list/filter-editor/filter-editor.component.ts - 169 + 168 is not empty src/app/components/document-list/filter-editor/filter-editor.component.ts - 173 + 172 greater than src/app/components/document-list/filter-editor/filter-editor.component.ts - 177 + 176 less than src/app/components/document-list/filter-editor/filter-editor.component.ts - 181 + 180 Correspondent: src/app/components/document-list/filter-editor/filter-editor.component.ts - 201,203 + 200,202 Without correspondent src/app/components/document-list/filter-editor/filter-editor.component.ts - 205 + 204 Document type: src/app/components/document-list/filter-editor/filter-editor.component.ts - 211,213 + 210,212 Without document type src/app/components/document-list/filter-editor/filter-editor.component.ts - 215 + 214 Storage path: src/app/components/document-list/filter-editor/filter-editor.component.ts - 221,223 + 220,222 Without storage path src/app/components/document-list/filter-editor/filter-editor.component.ts - 225 + 224 Tag: src/app/components/document-list/filter-editor/filter-editor.component.ts - 229,231 + 228,230 Without any tag src/app/components/document-list/filter-editor/filter-editor.component.ts - 235 + 234 Custom fields query src/app/components/document-list/filter-editor/filter-editor.component.ts - 239 + 238 Title: src/app/components/document-list/filter-editor/filter-editor.component.ts - 242 + 241 ASN: src/app/components/document-list/filter-editor/filter-editor.component.ts - 245 + 244 Owner: src/app/components/document-list/filter-editor/filter-editor.component.ts - 248 + 247 Owner not in: src/app/components/document-list/filter-editor/filter-editor.component.ts - 251 + 250 Without an owner src/app/components/document-list/filter-editor/filter-editor.component.ts - 254 + 253 diff --git a/src-ui/src/app/components/document-detail/document-detail.component.html b/src-ui/src/app/components/document-detail/document-detail.component.html index 86767b6e7..ba91d7f5d 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.html +++ b/src-ui/src/app/components/document-detail/document-detail.component.html @@ -45,7 +45,7 @@ Actions - + Reprocess @@ -53,15 +53,15 @@ More like this - + Split - + Rotate - + Delete page(s) @@ -70,7 +70,7 @@ @@ -122,7 +122,7 @@ @case (CustomFieldDataType.String) { @@ -130,7 +130,7 @@ @case (CustomFieldDataType.Date) { @@ -138,7 +138,7 @@ @case (CustomFieldDataType.Integer) { @@ -166,14 +166,14 @@ @case (CustomFieldDataType.Boolean) { } @case (CustomFieldDataType.Url) { @@ -182,7 +182,7 @@ @@ -194,7 +194,7 @@ bindLabel="label" [allowNull]="true" [horizontal]="true" - [removable]="userIsOwner" + [removable]="userIsOwner && userCanEdit" (removed)="removeField(fieldInstance)" [error]="getCustomFieldError(i)"> } 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 f1afd95c0..2b39535ca 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 @@ -577,6 +577,10 @@ export class DocumentDetailComponent this.permissionsService.currentUserHasObjectPermissions( PermissionAction.Change, doc + ) && + this.permissionsService.currentUserCan( + PermissionAction.Change, + PermissionType.Document ) ) { this.documentsService @@ -1066,6 +1070,13 @@ export class DocumentDetailComponent ) } + get userCanAdd(): boolean { + return this.permissionsService.currentUserCan( + PermissionAction.Add, + PermissionType.Document + ) + } + filterDocuments(items: ObjectWithId[] | NgbDateStruct[], type?: DataType) { const filterRules: FilterRule[] = items.flatMap((i) => { if (i.hasOwnProperty('year')) { diff --git a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html index 242e8abab..ac8f476c7 100644 --- a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html +++ b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.html @@ -105,18 +105,18 @@ - + Actions - + Reprocess - + Rotate - + Merge diff --git a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts index 499f52f03..f671602c0 100644 --- a/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts +++ b/src-ui/src/app/components/document-list/bulk-editor/bulk-editor.component.ts @@ -132,6 +132,20 @@ export class BulkEditorComponent return ownsAll } + get userCanEdit(): boolean { + return this.permissionService.currentUserCan( + PermissionAction.Change, + PermissionType.Document + ) + } + + get userCanAdd(): boolean { + return this.permissionService.currentUserCan( + PermissionAction.Add, + PermissionType.Document + ) + } + ngOnInit() { if ( this.permissionService.currentUserCan(