mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix inherited permissions being set at user level & unable to unselect existing perms
This commit is contained in:
		| @@ -69,6 +69,10 @@ export class PermissionsSelectComponent | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   writeValue(permissions: string[]): void { |   writeValue(permissions: string[]): void { | ||||||
|  |     if (this.permissions === permissions) { | ||||||
|  |       return | ||||||
|  |     } | ||||||
|  |  | ||||||
|     this.permissions = permissions ?? [] |     this.permissions = permissions ?? [] | ||||||
|     const allPerms = this._inheritedPermissions.concat(this.permissions) |     const allPerms = this._inheritedPermissions.concat(this.permissions) | ||||||
|  |  | ||||||
| @@ -138,7 +142,10 @@ export class PermissionsSelectComponent | |||||||
|           this.typesWithAllActions.delete(typeKey) |           this.typesWithAllActions.delete(typeKey) | ||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
|       this.onChange(permissions) |  | ||||||
|  |       this.onChange( | ||||||
|  |         permissions.filter((p) => !this._inheritedPermissions.includes(p)) | ||||||
|  |       ) | ||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon