From 5573e5c90239baff555f032cd8f7fcf589a483a3 Mon Sep 17 00:00:00 2001 From: P-Jeremy Date: Mon, 13 Jan 2025 16:28:49 +0100 Subject: [PATCH] feat(admin): allow email null when editing a user with userName connection --- admin/app/components/users/user-overview.gjs | 6 +++++- admin/tests/acceptance/authenticated/users/get-test.js | 2 +- .../integration/components/users/user-overview-test.gjs | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/admin/app/components/users/user-overview.gjs b/admin/app/components/users/user-overview.gjs index 583cda1da38..8417dce71a5 100644 --- a/admin/app/components/users/user-overview.gjs +++ b/admin/app/components/users/user-overview.gjs @@ -82,6 +82,10 @@ export default class UserOverview extends Component { return hasBeenAnonymised || isPixAgent; } + get isEmailRequired() { + return this.args.user.username ? null : 'obligatoire'; + } + _initForm() { this.form.firstName = this.args.user.firstName; this.form.lastName = this.args.user.lastName; @@ -201,7 +205,7 @@ export default class UserOverview extends Component { {{#if this.canModifyEmail}}