Browse Source

Add `tooltip` for `LockoutEnabled ` filed.

pull/20274/head
maliming 2 years ago
parent
commit
58d438a79a
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 6
      modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs
  2. 26
      modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor
  3. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ar.json
  4. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json
  5. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/de.json
  6. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/el.json
  7. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json
  8. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json
  9. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/es.json
  10. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fa.json
  11. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fi.json
  12. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fr.json
  13. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hi.json
  14. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hr.json
  15. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json
  16. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/is.json
  17. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/it.json
  18. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/nl.json
  19. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pl-PL.json
  20. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pt-BR.json
  21. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ro-RO.json
  22. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ru.json
  23. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sk.json
  24. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sl.json
  25. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json
  26. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/vi.json
  27. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json
  28. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hant.json
  29. 2
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml
  30. 4
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml

6
modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs

@ -172,21 +172,21 @@ public class IdentityUserAppService : IdentityAppServiceBase, IIdentityUserAppSe
(await UserManager.SetEmailAsync(user, input.Email)).CheckErrors();
}
if (!string.Equals(user.PhoneNumber, input.PhoneNumber, StringComparison.InvariantCultureIgnoreCase))
{
(await UserManager.SetPhoneNumberAsync(user, input.PhoneNumber)).CheckErrors();
}
(await UserManager.SetLockoutEnabledAsync(user, input.LockoutEnabled)).CheckErrors();
if (user.Id != CurrentUser.Id)
{
(await UserManager.SetLockoutEnabledAsync(user, input.LockoutEnabled)).CheckErrors();
user.SetIsActive(input.IsActive);
}
user.Name = input.Name;
user.Surname = input.Surname;
(await UserManager.UpdateAsync(user)).CheckErrors();
user.SetIsActive(input.IsActive);
if (input.RoleNames != null && await PermissionChecker.IsGrantedAsync(IdentityPermissions.Users.ManageRoles))
{
(await UserManager.SetRolesAsync(user, input.RoleNames)).CheckErrors();

26
modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor

@ -129,12 +129,11 @@
<Field>
<Check TValue="bool" @bind-Checked="@NewEntity.IsActive">@L["DisplayName:IsActive"]</Check>
</Field>
@if (!IsEditCurrentUser)
{
<Field>
<Check TValue="bool" @bind-Checked="@NewEntity.LockoutEnabled">@L["DisplayName:LockoutEnabled"]</Check>
</Field>
}
<Field>
<Tooltip Text="@L["Description:LockoutEnabled"].Value" style="width: fit-content;" Placement="TooltipPlacement.Right" >
<Check TValue="bool" @bind-Checked="@NewEntity.LockoutEnabled">@L["DisplayName:LockoutEnabled"] <Icon Name="IconName.InfoCircle"/> </Check>
</Tooltip>
</Field>
<ExtensionProperties TEntityType="IdentityUserCreateDto" TResourceType="IdentityResource" Entity="@NewEntity" LH="@LH" ModalType="ExtensionPropertyModalType.CreateModal" />
</TabPanel>
<TabPanel Name="Roles">
@ -253,12 +252,17 @@
</TextEdit>
</Field>
</Validation>
@if (!IsEditCurrentUser)
{
<Field>
<Check TValue="bool" @bind-Checked="EditingEntity.IsActive">@L["DisplayName:IsActive"]</Check>
</Field>
}
<Field>
<Check TValue="bool" @bind-Checked="EditingEntity.IsActive">@L["DisplayName:IsActive"]</Check>
</Field>
<Field>
<Check TValue="bool" @bind-Checked="EditingEntity.LockoutEnabled">@L["DisplayName:LockoutEnabled"]</Check>
</Field>
<Tooltip Text="@L["Description:LockoutEnabled"].Value" style="width: fit-content;" Placement="TooltipPlacement.Right" >
<Check TValue="bool" @bind-Checked="EditingEntity.LockoutEnabled">@L["DisplayName:LockoutEnabled"] <Icon Name="IconName.InfoCircle"/> </Check>
</Tooltip>
</Field>
<ExtensionProperties TEntityType="IdentityUserUpdateDto" TResourceType="IdentityResource" Entity="@EditingEntity" LH="@LH" ModalType="ExtensionPropertyModalType.EditModal" />
</TabPanel>
@if (EditUserRoles != null && EditUserRoles.Any())

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ar.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "التحقق من عاملين",
"DisplayName:IsActive": "نشيط",
"DisplayName:LockoutEnabled": "تأمين الحساب",
"Description:LockoutEnabled": "قفل الحساب بعد محاولات تسجيل الدخول الفاشلة",
"NewRole": "دور جديد",
"RoleName": "اسم الدور",
"CreationTime": "وقت الإنشاء",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Dvoufázové ověřování",
"DisplayName:IsActive": "Aktivní",
"DisplayName:LockoutEnabled": "Zamčení účtu",
"Description:LockoutEnabled": "Zamknout účet po neúspěšných pokusech o přihlášení",
"NewRole": "Nová role",
"RoleName": "Název role",
"CreationTime": "Vytvořeno",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/de.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Zwei-Faktor-Überprüfung",
"DisplayName:IsActive": "Aktiv",
"DisplayName:LockoutEnabled": "Konto-Sperrung",
"Description:LockoutEnabled": "Konto nach fehlgeschlagenen Anmeldeversuchen sperren",
"NewRole": "Neue Rolle",
"RoleName": "Rollenname",
"CreationTime": "Erstellungszeitpunkt",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/el.json

@ -27,6 +27,7 @@
"DisplayName:TwoFactorEnabled": "Επαλήθευση δύο παραγόντων",
"DisplayName:IsActive": "Ενεργός",
"DisplayName:LockoutEnabled": "Κλείδωμα λογαριασμού",
"Description:LockoutEnabled": "Κλείδωμα λογαριασμού μετά από αποτυχημένες προσπάθειες σύνδεσης",
"NewRole": "Νέος ρόλος",
"RoleName": "Όνομα ρόλου",
"CreationTime": "Χρόνος δημιουργίας",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json

@ -27,6 +27,7 @@
"DisplayName:PhoneNumber": "Phone Number",
"DisplayName:TwoFactorEnabled": "Two factor verification",
"DisplayName:LockoutEnabled": "Account lockout",
"Description:LockoutEnabled": "Lock account after failed login attempts",
"NewRole": "New role",
"RoleName": "Role name",
"CreationTime": "Creation time",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Two factor verification",
"DisplayName:IsActive": "Active",
"DisplayName:LockoutEnabled": "Account lockout",
"Description:LockoutEnabled": "Lock account after failed login attempts",
"NewRole": "New role",
"RoleName": "Role name",
"CreationTime": "Creation time",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/es.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Autenticación en dos pasos",
"DisplayName:IsActive": "Activo",
"DisplayName:LockoutEnabled": "Bloqueo de cuenta",
"Description:LockoutEnabled": "Bloquear cuenta después de intentos de inicio de sesión fallidos",
"NewRole": "Nuevo rol",
"RoleName": "Nombre de rol",
"CreationTime": "Fecha de creación",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fa.json

@ -27,6 +27,7 @@
"DisplayName:TwoFactorEnabled": "احراز هویت دو مرحله ای",
"DisplayName:IsActive": "فعال",
"DisplayName:LockoutEnabled": "قفل کردن حساب",
"Description:LockoutEnabled": "قفل کردن حساب پس از تلاش های ناموفق برای ورود",
"NewRole": "نقش/وظیفه جدید",
"RoleName": "نام نقش/وظیفه",
"CreationTime": "زمان ایجاد",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fi.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Kahden tekijän todentaminen",
"DisplayName:IsActive": "Aktiivinen",
"DisplayName:LockoutEnabled": "Tilin lukitus",
"Description:LockoutEnabled": "Tilin lukitus epäonnistuneiden kirjautumisyritysten jälkeen",
"NewRole": "Uusi rooli",
"RoleName": "Roolinimi",
"CreationTime": "Luomisaika",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fr.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Vérification de deux facteurs",
"DisplayName:IsActive": "actif",
"DisplayName:LockoutEnabled": "Verrouillage du compte",
"Description:LockoutEnabled": "Verrouiller le compte après des tentatives de connexion échouées",
"NewRole": "Nouveau rôle",
"RoleName": "Nom du rôle",
"CreationTime": "Temps de création",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hi.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "दो कारक सत्यापन",
"DisplayName:IsActive": "सक्रिय",
"DisplayName:LockoutEnabled": "खाता लॉकआउट",
"Description:LockoutEnabled": "विफल लॉगिन प्रयासों के बाद खाता लॉक करें",
"NewRole": "नयी भूमिका",
"RoleName": "भूमिका का नाम",
"CreationTime": "रचना समय",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hr.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Two factor verifikacija",
"DisplayName:IsActive": "Aktivan",
"DisplayName:LockoutEnabled": "Zaključavanje računa",
"Description:LockoutEnabled": "Zaključaj račun nakon neuspješnih pokušaja prijave",
"NewRole": "Nova uloga",
"RoleName": "Naziv uloge",
"CreationTime": "Vrijeme stvaranja",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Kétlépcsős azonosítás",
"DisplayName:IsActive": "Aktív",
"DisplayName:LockoutEnabled": "Fiók zárolása",
"Description:LockoutEnabled": "Fiók zárolása sikertelen bejelentkezési kísérletek után",
"NewRole": "Új szerepkör",
"RoleName": "Szerepkör neve",
"CreationTime": "Létrehozás időpontja",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/is.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Tvíþætt sannprófun",
"DisplayName:IsActive": "Virkur",
"DisplayName:LockoutEnabled": "Loka reikningi",
"Description:LockoutEnabled": "Loka reikningi eftir misheppnaðar innskráningar tilraunir",
"NewRole": "Nýtt hlutverk",
"RoleName": "Nafn hlutverks",
"CreationTime": "Búið til",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/it.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Verifica a due fattori",
"DisplayName:IsActive": "Attivo",
"DisplayName:LockoutEnabled": "Blocco account",
"Description:LockoutEnabled": "Blocca l'account dopo tentativi di accesso non riusciti",
"NewRole": "Nuovo ruolo",
"RoleName": "Nome del ruolo",
"CreationTime": "Orario di creazione",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/nl.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Tweefactor authenticatie",
"DisplayName:IsActive": "Actief",
"DisplayName:LockoutEnabled": "Account vergrendelen",
"Description:LockoutEnabled": "Account vergrendelen na mislukte inlogpogingen",
"NewRole": "Nieuwe rol",
"RoleName": "Rol naam",
"CreationTime": "Creatie tijd",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pl-PL.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Dwustopniowa weryfikacja",
"DisplayName:IsActive": "Aktywny",
"DisplayName:LockoutEnabled": "Blokada konta",
"Description:LockoutEnabled": "Zablokuj konto po nieudanych próbach logowania",
"NewRole": "Nowa rola",
"RoleName": "Nazwa roli",
"CreationTime": "Data utworzenia",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pt-BR.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Verificação em dois fatores",
"DisplayName:IsActive": "Ativo",
"DisplayName:LockoutEnabled": "Bloqueio de Conta",
"Description:LockoutEnabled": "Bloquear conta após tentativas de login falhas",
"NewRole": "Novo Perfil",
"RoleName": "Perfil",
"CreationTime": "Data de Criação",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ro-RO.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Autentificare în doi paşi",
"DisplayName:IsActive": "Activ",
"DisplayName:LockoutEnabled": "Blocare cont",
"Description:LockoutEnabled": "Blochează contul după încercări eşuate de autentificare",
"NewRole": "Rol nou",
"RoleName": "Nume rol",
"CreationTime": "Data creării",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ru.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Двухфакторная проверка подлинности",
"DisplayName:IsActive": "Активный",
"DisplayName:LockoutEnabled": "Блокировка учетной записи",
"Description:LockoutEnabled": "Блокировать учетную запись после неудачных попыток входа",
"NewRole": "Новая роль",
"RoleName": "Имя роли",
"CreationTime": "Время создания",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sk.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Dvojfaktorové overenie",
"DisplayName:IsActive": "Aktívne",
"DisplayName:LockoutEnabled": "Uzamknúť účet",
"Description:LockoutEnabled": "Uzamknúť účet po neúspešných pokusoch o prihlásenie",
"NewRole": "Nová rola",
"RoleName": "Názov roly",
"CreationTime": "Čas vytvorenia",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sl.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Dvostopenjsko preverjanje",
"DisplayName:IsActive": "Aktiven",
"DisplayName:LockoutEnabled": "Zaklepanje računa",
"Description:LockoutEnabled": "Zakleni račun po neuspelih poskusih prijave",
"NewRole": "Nova vloga",
"RoleName": "Naziv vloge",
"CreationTime": "Čas nastanka",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "İki aşamalı doğrulama",
"DisplayName:IsActive": "Aktif",
"DisplayName:LockoutEnabled": "Hesap kilitlenmesi",
"Description:LockoutEnabled": "Başarısız giriş denemelerinden sonra hesabı kitle",
"NewRole": "Yeni rol",
"RoleName": "Rol adı",
"CreationTime": "Oluşturma zamanı",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/vi.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "Xác thực hai yếu tố",
"DisplayName:IsActive": "Tích cực",
"DisplayName:LockoutEnabled": "Khóa tài khoản",
"Description:LockoutEnabled": "Khóa tài khoản sau các lần đăng nhập thất bại",
"NewRole": "Vai trò mới",
"RoleName": "Tên vai trò",
"CreationTime": "Thời gian tạo",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "二次认证",
"DisplayName:IsActive": "启用",
"DisplayName:LockoutEnabled": "账户锁定",
"Description:LockoutEnabled": "登录尝试失败后锁定帐户",
"NewRole": "新角色",
"RoleName": "角色名称",
"CreationTime": "创建时间",

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hant.json

@ -28,6 +28,7 @@
"DisplayName:TwoFactorEnabled": "二次認證",
"DisplayName:IsActive": "啟用",
"DisplayName:LockoutEnabled": "帳號鎖定",
"Description:LockoutEnabled": "登錄嘗試失敗后鎖定帳戶",
"NewRole": "新角色",
"RoleName": "角色名稱",
"CreationTime": "建立時間",

2
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml

@ -37,7 +37,7 @@
<abp-input asp-for="UserInfo.Email" />
<abp-input asp-for="UserInfo.PhoneNumber" />
<abp-input asp-for="UserInfo.IsActive" />
<abp-input asp-for="UserInfo.LockoutEnabled" />
<abp-input asp-for="UserInfo.LockoutEnabled" label-tooltip="@L.GetString("Description:LockoutEnabled")" />
@foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties<CreateModalModel.UserInfoViewModel>())
{

4
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml

@ -38,11 +38,11 @@
</div>
<abp-input asp-for="UserInfo.Email" />
<abp-input asp-for="UserInfo.PhoneNumber" />
<abp-input asp-for="UserInfo.IsActive" />
@if (!Model.IsEditCurrentUser)
{
<abp-input asp-for="UserInfo.LockoutEnabled" />
<abp-input asp-for="UserInfo.IsActive" />
}
<abp-input asp-for="UserInfo.LockoutEnabled" label-tooltip="@L.GetString("Description:LockoutEnabled")" />
@foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties<EditModalModel.UserInfoViewModel>())
{
if (!propertyInfo.Name.EndsWith("_Text"))

Loading…
Cancel
Save