fix(core): User update endpoint should only allow updating email, firstName, and lastName (#5526)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-02-21 11:22:54 +01:00
committed by GitHub
parent eef2574067
commit 510855d958
7 changed files with 101 additions and 40 deletions

View File

@@ -111,6 +111,9 @@ export class User extends AbstractEntity implements IUser {
@AfterLoad()
@AfterUpdate()
computeIsPending(): void {
this.isPending = this.password === null;
this.isPending =
this.globalRole?.name === 'owner' && this.globalRole.scope === 'global'
? false
: this.password === null;
}
}