diff --git a/src-ui/src/app/components/common/permissions-select/permissions-select.component.ts b/src-ui/src/app/components/common/permissions-select/permissions-select.component.ts index 74e8a73c4..fa97a3b55 100644 --- a/src-ui/src/app/components/common/permissions-select/permissions-select.component.ts +++ b/src-ui/src/app/components/common/permissions-select/permissions-select.component.ts @@ -69,6 +69,10 @@ export class PermissionsSelectComponent } writeValue(permissions: string[]): void { + if (this.permissions === permissions) { + return + } + this.permissions = permissions ?? [] const allPerms = this._inheritedPermissions.concat(this.permissions) @@ -138,7 +142,10 @@ export class PermissionsSelectComponent this.typesWithAllActions.delete(typeKey) } }) - this.onChange(permissions) + + this.onChange( + permissions.filter((p) => !this._inheritedPermissions.includes(p)) + ) }) }