Browse Source

Merge pull request #21906 from abpframework/Warn-developer-to-migrate-seed-database

Warn developer to migrate & seed database if no user in the database.
pull/22316/head
Halil İbrahim Kalkan 1 year ago
committed by GitHub
parent
commit
741051b64a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 39
      docs/en/kb/can-not-login-with-admin-user.md
  2. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ar.json
  3. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json
  4. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json
  5. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json
  6. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json
  7. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json
  8. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json
  9. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es-mx.json
  10. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es.json
  11. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json
  12. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json
  13. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json
  14. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json
  15. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json
  16. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json
  17. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json
  18. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json
  19. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json
  20. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json
  21. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json
  22. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json
  23. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json
  24. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json
  25. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json
  26. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sv.json
  27. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json
  28. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json
  29. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json
  30. 4
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json
  31. 6
      modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs
  32. 6
      modules/account/src/Volo.Abp.Account.Web.OpenIddict/Pages/Account/OpenIddictSupportedLoginModel.cs
  33. 8
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml
  34. 19
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs

39
docs/en/kb/can-not-login-with-admin-user.md

@ -1,5 +1,36 @@
# KB#0003: Can not login with the admin user
# KB#0003: Cannot login with the admin user
* Try username `admin` and Password `1q2w3E*`.
* Try to migrate database. If you have a `DbMigrator` application in your solution, use it. It will seed initial data and create the admin user for you.
* If not works, read the README.MD file in your solution, or check the [Getting Started](https://abp.io/docs/latest/get-started) document.
## Use the Correct Username and Password
You may have entered the wrong password. The username is `admin`, and the password is `1q2w3E*`. Note that the password is case-sensitive.
## Forgot to Seed Initial Data
You may need to add migrations and update the database using the EF Core CLI. If your solution includes a `DbMigrator` application, you must run the `DbMigrator` application to seed the initial data.
If your project does not include a `DbMigrator` application, there might be a `migrate-database.ps1` script available. You can use it to migrate and seed the initial data.
> The no-layer application typically support a `--migrate-database` option for migrating and seeding initial data.
> Example:
> ```bash
> dotnet run --migrate-database
> ```
## Tenant Admin User
If you cannot log in as a tenant admin user, ensure the tenant database is created and seeded, Use the password that was set during tenant creation.
> The tenant seeding process is handled by the template project. If it is not completed, please check the `Logs` file for any error logs.
## Check the `AbpUsers` Table
If you have performed migration and seeded the initial data, check the `AbpUsers` table in the database. Ensure that the user record exists. If your tenant has a separate database, check the tenant database as well.
Passwords are stored in hashed format, not plain text. If you suspect the password is incorrect, you can delete the user record and re-seed the initial data using the `DbMigrator` application or the `migrate-database.ps1` script.
## Other Issues
If the issue persists, refer to the `README.MD` file in your solution or consult the [Getting Started](https://abp.io/docs/latest/get-started) documentation.
Feel free to create an issue in the [ABP GitHub repository](https://github.com/abpframework/abp/issues/new/choose) or contact [ABP Commercial Support](https://abp.io/support/questions/New) for assistance.

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ar.json

@ -68,6 +68,8 @@
"AccessDenied": "تم الرفض!",
"AccessDeniedMessage": "ليس لديك حق الوصول إلى هذا المورد.",
"OrRegisterWith": "أو التسجيل بـ:",
"RegisterUsingYourProviderAccount": "قم بالتسجيل باستخدام حسابك في {0}"
"RegisterUsingYourProviderAccount": "قم بالتسجيل باستخدام حسابك في {0}",
"RequireMigrateSeedTitle": "تعذر العثور على المستخدم المسؤول",
"RequireMigrateSeedMessage": "يرجى التأكد من تنفيذ seed قاعدة البيانات. راجع <a target=\"_blank\" href=\"https://abp.io/kb/0003\">الوثائق</a> للحلول الممكنة."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json

@ -68,6 +68,8 @@
"AccessDenied": "Přístup odepřen!",
"AccessDeniedMessage": "K tomuto zdroji nemáte přístup.",
"OrRegisterWith": "Nebo se registrujte pomocí:",
"RegisterUsingYourProviderAccount": "Registrovat pomocí vašeho účtu {0}"
"RegisterUsingYourProviderAccount": "Registrovat pomocí vašeho účtu {0}",
"RequireMigrateSeedTitle": "Nelze najít uživatele správce",
"RequireMigrateSeedMessage": "Ujistěte se, že je spuštěn seed databáze. Podívejte se na <a target=\"_blank\" href=\"https://abp.io/kb/0003\">dokumentaci</a> pro možná řešení."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json

@ -65,6 +65,8 @@
"AccessDenied": "Adgang nægtet!",
"AccessDeniedMessage": "Du har ikke adgang til denne ressource.",
"OrRegisterWith": "Eller registrér med:",
"RegisterUsingYourProviderAccount": "Registrér med din {0} konto"
"RegisterUsingYourProviderAccount": "Registrér med din {0} konto",
"RequireMigrateSeedTitle": "Kunne ikke finde administratorbrugeren",
"RequireMigrateSeedMessage": "Sørg for, at databasens seed bliver udført. Se <a target=\"_blank\" href=\"https://abp.io/kb/0003\">dokumentationen</a> for mulige løsninger."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json

@ -68,6 +68,8 @@
"AccessDenied": "Zugriff abgelehnt!",
"AccessDeniedMessage": "Sie haben keinen Zugriff auf diese Ressource.",
"OrRegisterWith": "Oder registrieren Sie sich mit:",
"RegisterUsingYourProviderAccount": "Registrieren Sie sich mit Ihrem {0} Benutzerkonto"
"RegisterUsingYourProviderAccount": "Registrieren Sie sich mit Ihrem {0} Benutzerkonto",
"RequireMigrateSeedTitle": "Der Administrator-Benutzer konnte nicht gefunden werden",
"RequireMigrateSeedMessage": "Bitte stellen Sie sicher, dass die Datenbank-Seed ausgeführt wird. Siehe <a target=\"_blank\" href=\"https://abp.io/kb/0003\">Dokumentation</a> für mögliche Lösungen."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json

@ -66,6 +66,8 @@
"AccessDenied": "Δεν επιτρέπεται η πρόσβαση!",
"AccessDeniedMessage": "Δεν έχετε πρόσβαση σε αυτόν τον πόρο.",
"OrRegisterWith": "Ή εγγραφείτε με:",
"RegisterUsingYourProviderAccount": "Εγγραφείτε χρησιμοποιώντας τον λογαριασμό σας {0}"
"RegisterUsingYourProviderAccount": "Εγγραφείτε χρησιμοποιώντας τον λογαριασμό σας {0}",
"RequireMigrateSeedTitle": "Δεν βρέθηκε ο χρήστης διαχειριστή",
"RequireMigrateSeedMessage": "Βεβαιωθείτε ότι εκτελείται το seed της βάσης δεδομένων. Δείτε την <a target=\"_blank\" href=\"https://abp.io/kb/0003\">τεκμηρίωση</a> για πιθανές λύσεις."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json

@ -63,6 +63,8 @@
"PasswordResetInfoInEmail": "We received an account recovery request! If you initiated this request, click the following link to reset your password.",
"ResetMyPassword": "Reset my password",
"OrRegisterWith": "Or register with",
"RegisterUsingYourProviderAccount": "Register using your {0} account"
"RegisterUsingYourProviderAccount": "Register using your {0} account",
"RequireMigrateSeedTitle": "Could not find the admin user",
"RequireMigrateSeedMessage": "Please ensure that the database seed is executed. See <a target=\"_blank\" href=\"https://abp.io/kb/0003\">documentation</a> for possible solutions."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json

@ -68,6 +68,8 @@
"AccessDenied": "Access denied!",
"AccessDeniedMessage": "You do not have access to this resource.",
"OrRegisterWith": "Or register with",
"RegisterUsingYourProviderAccount": "Register using your {0} account"
"RegisterUsingYourProviderAccount": "Register using your {0} account",
"RequireMigrateSeedTitle": "Could not find the admin user",
"RequireMigrateSeedMessage": "Please ensure that the database seed is executed. See <a target=\"_blank\" href=\"https://abp.io/kb/0003\">documentation</a> for possible solutions."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es-mx.json

@ -36,6 +36,8 @@
"Manage": "Administrar",
"MyAccount": "Mi cuenta",
"OrRegisterWith": "O registrarse con",
"RegisterUsingYourProviderAccount": "Registrarse con su cuenta de {0} "
"RegisterUsingYourProviderAccount": "Registrarse con su cuenta de {0} ",
"RequireMigrateSeedTitle": "No se pudo encontrar el usuario administrador",
"RequireMigrateSeedMessage": "Asegúrese de que se ejecute la semilla de la base de datos. Consulte la <a target=\"_blank\" href=\"https://abp.io/kb/0003\">documentación</a> para posibles soluciones."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/es.json

@ -68,6 +68,8 @@
"AccessDenied": "¡Acceso denegado!",
"AccessDeniedMessage": "No tienes acceso a este recurso.",
"OrRegisterWith": "O registrarse con:",
"RegisterUsingYourProviderAccount": "Registrarse con su cuenta de {0} "
"RegisterUsingYourProviderAccount": "Registrarse con su cuenta de {0} ",
"RequireMigrateSeedTitle": "No se pudo encontrar el usuario administrador",
"RequireMigrateSeedMessage": "Asegúrese de que se ejecute la semilla de la base de datos. Consulte la <a target=\"_blank\" href=\"https://abp.io/kb/0003\">documentación</a> para posibles soluciones."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json

@ -66,6 +66,8 @@
"AccessDenied": "دسترسی ممنوع!",
"AccessDeniedMessage": "شما به این منبع دسترسی ندارید.",
"OrRegisterWith": "یا ثبت نام کنید با:",
"RegisterUsingYourProviderAccount": "با استفاده از حساب {0} خود ثبت نام کنید"
"RegisterUsingYourProviderAccount": "با استفاده از حساب {0} خود ثبت نام کنید",
"RequireMigrateSeedTitle": "کاربر مدیر پیدا نشد",
"RequireMigrateSeedMessage": "لطفاً اطمینان حاصل کنید که seed پایگاه داده اجرا شده است. برای راه‌حل‌های ممکن <a target=\"_blank\" href=\"https://abp.io/kb/0003\">مستندات</a> را ببینید."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json

@ -68,6 +68,8 @@
"AccessDenied": "Pääsy evätty!",
"AccessDeniedMessage": "Sinulla ei ole pääsyä tähän resurssiin.",
"OrRegisterWith": "Tai rekisteröidy:",
"RegisterUsingYourProviderAccount": "Rekisteröidy {0} -tililläsi"
"RegisterUsingYourProviderAccount": "Rekisteröidy {0} -tililläsi",
"RequireMigrateSeedTitle": "Järjestelmänvalvojaa ei löydy",
"RequireMigrateSeedMessage": "Varmista, että tietokannan siemennys on suoritettu. Katso <a target=\"_blank\" href=\"https://abp.io/kb/0003\">dokumentaatio</a> mahdollisia ratkaisuja varten."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json

@ -68,6 +68,8 @@
"AccessDenied": "Accès refusé!",
"AccessDeniedMessage": "Vous n'avez pas accès à cette ressource.",
"OrRegisterWith": "Or register with",
"RegisterUsingYourProviderAccount": "Register using your {0} account"
"RegisterUsingYourProviderAccount": "Register using your {0} account",
"RequireMigrateSeedTitle": "Impossible de trouver l'utilisateur administrateur",
"RequireMigrateSeedMessage": "Veuillez vous assurer que l'initialisation de la base de données est exécutée. Consultez la <a target=\"_blank\" href=\"https://abp.io/kb/0003\">documentation</a> pour les solutions possibles."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json

@ -68,6 +68,8 @@
"AccessDenied": "पहुंच अस्वीकृत!",
"AccessDeniedMessage": "आपके पास इस संसाधन तक पहुँच नहीं है।",
"OrRegisterWith": "या इसके साथ पंजीकरण करें:",
"RegisterUsingYourProviderAccount": "अपने {0} खाते का उपयोग करके पंजीकरण करें"
"RegisterUsingYourProviderAccount": "अपने {0} खाते का उपयोग करके पंजीकरण करें",
"RequireMigrateSeedTitle": "व्यवस्थापक उपयोगकर्ता नहीं मिला",
"RequireMigrateSeedMessage": "कृपया सुनिश्चित करें कि डेटाबेस सीड निष्पादित किया गया है। संभावित समाधानों के लिए <a target=\"_blank\" href=\"https://abp.io/kb/0003\">दस्तावेज़ीकरण</a> देखें।"
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json

@ -68,6 +68,8 @@
"AccessDenied": "Pristup odbijen!",
"AccessDeniedMessage": "Nemate pristup ovom resursu.",
"OrRegisterWith": "Ili se registrirajte sa:",
"RegisterUsingYourProviderAccount": "Registrirajte se koristeći svoj {0} račun"
"RegisterUsingYourProviderAccount": "Registrirajte se koristeći svoj {0} račun",
"RequireMigrateSeedTitle": "Nije moguće pronaći administratorskog korisnika",
"RequireMigrateSeedMessage": "Molimo provjerite je li izvršeno početno punjenje baze podataka. Pogledajte <a target=\"_blank\" href=\"https://abp.io/kb/0003\">dokumentaciju</a> za moguća rješenja."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json

@ -68,6 +68,8 @@
"AccessDenied": "Hozzáférés megtagadva!",
"AccessDeniedMessage": "Nincs hozzáférése ehhez az erőforráshoz.",
"OrRegisterWith": "Vagy regisztráljon:",
"RegisterUsingYourProviderAccount": "Regisztráljon a(z) {0} fiókjával"
"RegisterUsingYourProviderAccount": "Regisztráljon a(z) {0} fiókjával",
"RequireMigrateSeedTitle": "Nem található az adminisztrátor felhasználó",
"RequireMigrateSeedMessage": "Kérjük, győződjön meg arról, hogy az adatbázis seed végrehajtásra került. Tekintse meg a <a target=\"_blank\" href=\"https://abp.io/kb/0003\">dokumentációt</a> a lehetséges megoldásokért."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json

@ -68,6 +68,8 @@
"AccessDenied": "Aðgangi hafnað!",
"AccessDeniedMessage": "Þú hefur ekki aðgang að þessari auðlind.",
"OrRegisterWith": "Eða skráðu þig með:",
"RegisterUsingYourProviderAccount": "Skráðu þig með {0} aðganginum þínum"
"RegisterUsingYourProviderAccount": "Skráðu þig með {0} aðganginum þínum",
"RequireMigrateSeedTitle": "Ekki tókst að finna stjórnandann",
"RequireMigrateSeedMessage": "Vinsamlegast gakktu úr skugga um að gagnagrunnsfræið sé keyrt. Sjá <a target=\"_blank\" href=\"https://abp.io/kb/0003\">fylgiskjöl</a> fyrir mögulegar lausnir."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json

@ -68,6 +68,8 @@
"AccessDenied": "Accesso negato!",
"AccessDeniedMessage": "Non hai accesso a questa risorsa.",
"OrRegisterWith": "Oppure registrati con:",
"RegisterUsingYourProviderAccount": "Registrati utilizzando il tuo account {0}"
"RegisterUsingYourProviderAccount": "Registrati utilizzando il tuo account {0}",
"RequireMigrateSeedTitle": "Impossibile trovare l'utente amministratore",
"RequireMigrateSeedMessage": "Assicurati che il seed del database sia eseguito. Consulta la <a target=\"_blank\" href=\"https://abp.io/kb/0003\">documentazione</a> per possibili soluzioni."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json

@ -68,6 +68,8 @@
"AccessDenied": "Toegang geweigerd!",
"AccessDeniedMessage": "U heeft geen toegang tot deze bron.",
"OrRegisterWith": "Of registreer met:",
"RegisterUsingYourProviderAccount": "Registreer met uw {0} -account"
"RegisterUsingYourProviderAccount": "Registreer met uw {0} -account",
"RequireMigrateSeedTitle": "Kan de beheerder niet vinden",
"RequireMigrateSeedMessage": "Zorg ervoor dat het database seed wordt uitgevoerd. Zie <a target=\"_blank\" href=\"https://abp.io/kb/0003\">documentatie</a> voor mogelijke oplossingen."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json

@ -68,6 +68,8 @@
"AccessDenied": "Brak dostępu!",
"AccessDeniedMessage": "Nie masz dostępu do tego zasobu.",
"OrRegisterWith": "Lub zarejestruj się za pomocą:",
"RegisterUsingYourProviderAccount": "Zarejestruj się za pomocą konta {0}"
"RegisterUsingYourProviderAccount": "Zarejestruj się za pomocą konta {0}",
"RequireMigrateSeedTitle": "Nie można znaleźć użytkownika administratora",
"RequireMigrateSeedMessage": "Upewnij się, że wykonano seed bazy danych. Zobacz <a target=\"_blank\" href=\"https://abp.io/kb/0003\">dokumentację</a>, aby poznać możliwe rozwiązania."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json

@ -68,6 +68,8 @@
"AccessDenied": "Acesso negado!",
"AccessDeniedMessage": "Você não tem acesso a este recurso.",
"OrRegisterWith": "Ou registre-se com:",
"RegisterUsingYourProviderAccount": "Registre-se utilizando sua conta {0}"
"RegisterUsingYourProviderAccount": "Registre-se utilizando sua conta {0}",
"RequireMigrateSeedTitle": "Não foi possível encontrar o usuário administrador",
"RequireMigrateSeedMessage": "Certifique-se de que a semeadura do banco de dados seja executada. Consulte a <a target=\"_blank\" href=\"https://abp.io/kb/0003\">documentação</a> para possíveis soluções."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json

@ -68,6 +68,8 @@
"AccessDenied": "Acces interzis!",
"AccessDeniedMessage": "Nu aveţi acces la această resursă.",
"OrRegisterWith": "Sau înregistraţi-vă cu:",
"RegisterUsingYourProviderAccount": "Înregistraţi-vă folosindu-vă contul {0}"
"RegisterUsingYourProviderAccount": "Înregistraţi-vă folosindu-vă contul {0}",
"RequireMigrateSeedTitle": "Nu s-a putut găsi utilizatorul admin",
"RequireMigrateSeedMessage": "Vă rugăm să vă asiguraţi că seed-ul bazei de date este executat. Consultaţi <a target=\"_blank\" href=\"https://abp.io/kb/0003\">documentaţia</a> pentru soluţii posibile."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json

@ -68,6 +68,8 @@
"AccessDenied": "В доступе отказано!",
"AccessDeniedMessage": "У вас нет доступа к этому ресурсу.",
"OrRegisterWith": "Или зарегистрируйтесь с помощью:",
"RegisterUsingYourProviderAccount": "Зарегистрируйтесь, используя свой {0} аккаунт"
"RegisterUsingYourProviderAccount": "Зарегистрируйтесь, используя свой {0} аккаунт",
"RequireMigrateSeedTitle": "Не удалось найти пользователя-администратора",
"RequireMigrateSeedMessage": "Пожалуйста, убедитесь, что выполнено начальное заполнение базы данных. Смотрите <a target=\"_blank\" href=\"https://abp.io/kb/0003\">документацию</a> для возможных решений."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json

@ -68,6 +68,8 @@
"AccessDenied": "Prístup zamietnutý!",
"AccessDeniedMessage": "K tomuto zdroju nemáte prístup.",
"OrRegisterWith": "Alebo sa zaregistrujte pomocou:",
"RegisterUsingYourProviderAccount": "Zaregistrujte sa pomocou svojho {0} účtu"
"RegisterUsingYourProviderAccount": "Zaregistrujte sa pomocou svojho {0} účtu",
"RequireMigrateSeedTitle": "Nepodarilo sa nájsť používateľa správcu",
"RequireMigrateSeedMessage": "Uistite sa, že je spustené seed databázy. Pozrite si <a target=\"_blank\" href=\"https://abp.io/kb/0003\">dokumentáciu</a> pre možné riešenia."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json

@ -68,6 +68,8 @@
"AccessDenied": "Dostop zavrnjen!",
"AccessDeniedMessage": "Nimate dostopa do tega vira.",
"OrRegisterWith": "Ali pa se registrirajte z:",
"RegisterUsingYourProviderAccount": "Registrirajte se z uporabo vašega {0} računa"
"RegisterUsingYourProviderAccount": "Registrirajte se z uporabo vašega {0} računa",
"RequireMigrateSeedTitle": "Skrbniškega uporabnika ni mogoče najti",
"RequireMigrateSeedMessage": "Prepričajte se, da je seed baze podatkov izveden. Za možne rešitve glejte <a target=\"_blank\" href=\"https://abp.io/kb/0003\">dokumentacijo</a>."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sv.json

@ -68,6 +68,8 @@
"AccessDenied": "Åtkomst nekad!",
"AccessDeniedMessage": "Du har inte tillgång till denna resurs.",
"OrRegisterWith": "Eller registrera dig med",
"RegisterUsingYourProviderAccount": "Registrera dig med ditt {0} konto"
"RegisterUsingYourProviderAccount": "Registrera dig med ditt {0} konto",
"RequireMigrateSeedTitle": "Kunde inte hitta administratörsanvändaren",
"RequireMigrateSeedMessage": "Se till att databasens seed körs. Se <a target=\"_blank\" href=\"https://abp.io/kb/0003\">dokumentationen</a> för möjliga lösningar."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json

@ -68,6 +68,8 @@
"AccessDenied": "Erişim reddedildi!",
"AccessDeniedMessage": "Bu kaynağa erişiminiz yok.",
"OrRegisterWith": "Veya bunlarla kayıt ol:",
"RegisterUsingYourProviderAccount": "{0} hesabınızla kayıt olun."
"RegisterUsingYourProviderAccount": "{0} hesabınızla kayıt olun.",
"RequireMigrateSeedTitle": "Yönetici kullanıcısı bulunamadı",
"RequireMigrateSeedMessage": "Lütfen veritabanı tohumunun yürütüldüğünden emin olun. Olası çözümler için <a target=\"_blank\" href=\"https://abp.io/kb/0003\">belgelere</a> bakın."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json

@ -68,6 +68,8 @@
"AccessDenied": "Quyền truy cập bị từ chối!",
"AccessDeniedMessage": "Bạn không có quyền truy cập vào tài nguyên này.",
"OrRegisterWith": "Hoặc đăng ký bằng:",
"RegisterUsingYourProviderAccount": "Đăng ký bằng tài khoản {0} của bạn"
"RegisterUsingYourProviderAccount": "Đăng ký bằng tài khoản {0} của bạn",
"RequireMigrateSeedTitle": "Không thể tìm thấy người dùng quản trị",
"RequireMigrateSeedMessage": "Vui lòng đảm bảo rằng seed cơ sở dữ liệu được thực thi. Xem <a target=\"_blank\" href=\"https://abp.io/kb/0003\">tài liệu</a> để biết các giải pháp có thể."
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json

@ -68,6 +68,8 @@
"AccessDenied": "拒绝访问!",
"AccessDeniedMessage": "您无法访问此资源。",
"OrRegisterWith": "或注册",
"RegisterUsingYourProviderAccount": "使用您的 {0} 账户注册"
"RegisterUsingYourProviderAccount": "使用您的 {0} 账户注册",
"RequireMigrateSeedTitle": "找不到管理员用户",
"RequireMigrateSeedMessage": "请确保已执行数据库种子数据。查看<a target=\"_blank\" href=\"https://abp.io/kb/0003\">文档</a>了解可能的解决方案。"
}
}

4
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json

@ -68,6 +68,8 @@
"AccessDenied": "拒絕訪問!",
"AccessDeniedMessage": "您無權訪問此資源.",
"OrRegisterWith": "或是註冊用:",
"RegisterUsingYourProviderAccount": "使用你的{0}帳號註冊"
"RegisterUsingYourProviderAccount": "使用你的{0}帳號註冊",
"RequireMigrateSeedTitle": "找不到管理員用戶",
"RequireMigrateSeedMessage": "請確保已執行資料庫種子資料。查看<a target=\"_blank\" href=\"https://abp.io/kb/0003\">文檔</a>了解可能的解決方案。"
}
}

6
modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs

@ -11,6 +11,7 @@ using System.Diagnostics;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Volo.Abp.Account.Settings;
using Volo.Abp.DependencyInjection;
@ -35,8 +36,9 @@ public class IdentityServerSupportedLoginModel : LoginModel
IdentityDynamicClaimsPrincipalContributorCache identityDynamicClaimsPrincipalContributorCache,
IIdentityServerInteractionService interaction,
IClientStore clientStore,
IEventService identityServerEvents)
: base(schemeProvider, accountOptions, identityOptions, identityDynamicClaimsPrincipalContributorCache)
IEventService identityServerEvents,
IWebHostEnvironment webHostEnvironment)
: base(schemeProvider, accountOptions, identityOptions, identityDynamicClaimsPrincipalContributorCache, webHostEnvironment)
{
Interaction = interaction;
ClientStore = clientStore;

6
modules/account/src/Volo.Abp.Account.Web.OpenIddict/Pages/Account/OpenIddictSupportedLoginModel.cs

@ -2,6 +2,7 @@ using System;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Options;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
@ -24,8 +25,9 @@ public class OpenIddictSupportedLoginModel : LoginModel
IOptions<AbpAccountOptions> accountOptions,
IOptions<IdentityOptions> identityOptions,
IdentityDynamicClaimsPrincipalContributorCache identityDynamicClaimsPrincipalContributorCache,
AbpOpenIddictRequestHelper openIddictRequestHelper)
: base(schemeProvider, accountOptions, identityOptions, identityDynamicClaimsPrincipalContributorCache)
AbpOpenIddictRequestHelper openIddictRequestHelper,
IWebHostEnvironment webHostEnvironment)
: base(schemeProvider, accountOptions, identityOptions, identityDynamicClaimsPrincipalContributorCache, webHostEnvironment)
{
OpenIddictRequestHelper = openIddictRequestHelper;
}

8
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml

@ -22,6 +22,14 @@
</abp-script-bundle>
}
@if (Model.ShowRequireMigrateSeedMessage)
{
<div class="alert alert-danger">
<h4 class="alert-heading">@L["RequireMigrateSeedTitle"]</h4>
<p>@L["RequireMigrateSeedMessage"]</p>
</div>
}
<div class="card mt-3 shadow-sm rounded">
<div class="card-body p-5">
<h4>@L["Login"]</h4>

19
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs

@ -10,6 +10,8 @@ using System.Diagnostics;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Volo.Abp.Account.Settings;
using Volo.Abp.Auditing;
using Volo.Abp.Identity;
@ -53,18 +55,22 @@ public class LoginModel : AccountPageModel
protected AbpAccountOptions AccountOptions { get; }
protected IOptions<IdentityOptions> IdentityOptions { get; }
protected IdentityDynamicClaimsPrincipalContributorCache IdentityDynamicClaimsPrincipalContributorCache { get; }
protected IWebHostEnvironment WebHostEnvironment { get; }
public bool ShowCancelButton { get; set; }
public bool ShowRequireMigrateSeedMessage { get; set; }
public LoginModel(
IAuthenticationSchemeProvider schemeProvider,
IOptions<AbpAccountOptions> accountOptions,
IOptions<IdentityOptions> identityOptions,
IdentityDynamicClaimsPrincipalContributorCache identityDynamicClaimsPrincipalContributorCache)
IdentityDynamicClaimsPrincipalContributorCache identityDynamicClaimsPrincipalContributorCache,
IWebHostEnvironment webHostEnvironment)
{
SchemeProvider = schemeProvider;
IdentityOptions = identityOptions;
AccountOptions = accountOptions.Value;
IdentityDynamicClaimsPrincipalContributorCache = identityDynamicClaimsPrincipalContributorCache;
WebHostEnvironment = webHostEnvironment;
}
public virtual async Task<IActionResult> OnGetAsync()
@ -130,6 +136,17 @@ public class LoginModel : AccountPageModel
if (!result.Succeeded)
{
if (LoginInput.UserNameOrEmailAddress == IdentityDataSeedContributor.AdminUserNameDefaultValue &&
WebHostEnvironment.IsDevelopment())
{
var adminUser = await UserManager.FindByNameAsync(IdentityDataSeedContributor.AdminUserNameDefaultValue);
if (adminUser == null)
{
ShowRequireMigrateSeedMessage = true;
return Page();
}
}
Alerts.Danger(L["InvalidUserNameOrPassword"]);
return Page();
}

Loading…
Cancel
Save