mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix mixed rule / owner check, component input / output
This commit is contained in:
		| @@ -21,10 +21,13 @@ export class PermissionsDialogComponent { | |||||||
|     this.userService.listAll().subscribe((r) => (this.users = r.results)) |     this.userService.listAll().subscribe((r) => (this.users = r.results)) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   @Output() | ||||||
|   public confirmClicked = new EventEmitter() |   public confirmClicked = new EventEmitter() | ||||||
|  |  | ||||||
|  |   @Input() | ||||||
|   title = $localize`Set permissions` |   title = $localize`Set permissions` | ||||||
|  |  | ||||||
|  |   @Input() | ||||||
|   set object(o: ObjectWithPermissions) { |   set object(o: ObjectWithPermissions) { | ||||||
|     this.o = o |     this.o = o | ||||||
|     this.title = $localize`Edit permissions for ` + o['name'] |     this.title = $localize`Edit permissions for ` + o['name'] | ||||||
| @@ -54,6 +57,7 @@ export class PermissionsDialogComponent { | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   @Input() | ||||||
|   message = $localize`Note that permissions set here will override any existing permissions` |   message = $localize`Note that permissions set here will override any existing permissions` | ||||||
|  |  | ||||||
|   cancelClicked() { |   cancelClicked() { | ||||||
|   | |||||||
| @@ -343,7 +343,7 @@ | |||||||
|                     <div class="col"> |                     <div class="col"> | ||||||
|                       <div class="btn-group"> |                       <div class="btn-group"> | ||||||
|                         <button *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.MailAccount }" [disabled]="!userCanEdit(account)" class="btn btn-sm btn-primary" type="button" (click)="editMailAccount(account)" i18n>Edit</button> |                         <button *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.MailAccount }" [disabled]="!userCanEdit(account)" class="btn btn-sm btn-primary" type="button" (click)="editMailAccount(account)" i18n>Edit</button> | ||||||
|                         <button *pngxIfOwner="rule" class="btn btn-sm btn-primary" type="button" (click)="editPermissions(account)" i18n>Permissions</button> |                         <button *pngxIfOwner="account" class="btn btn-sm btn-primary" type="button" (click)="editPermissions(account)" i18n>Permissions</button> | ||||||
|                         <button *pngxIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.MailAccount }" [disabled]="!userIsOwner(account)" class="btn btn-sm btn-outline-danger" type="button" (click)="deleteMailAccount(account)" i18n>Delete</button> |                         <button *pngxIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.MailAccount }" [disabled]="!userIsOwner(account)" class="btn btn-sm btn-outline-danger" type="button" (click)="deleteMailAccount(account)" i18n>Delete</button> | ||||||
|                       </div> |                       </div> | ||||||
|                     </div> |                     </div> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon