Skip to content

Commit

Permalink
Remove cancel functionality from Login
Browse files Browse the repository at this point in the history
  • Loading branch information
enisn committed Sep 19, 2022
1 parent c5c0f9f commit 8d840a5
Show file tree
Hide file tree
Showing 35 changed files with 24 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "تم تعطيل التسجيل الذاتي لهذا التطبيق. يرجى الاتصال بمسؤول التطبيق لتسجيل مستخدم جديد.",
"LocalLoginDisabledMessage": "تسجيل الدخول المحلي معطّل لهذا التطبيق.",
"Login": "دخول",
"Cancel": "إلغاء",
"Register": "تسجيل",
"AreYouANewUser": "هل أنت مستخدم جديد?",
"AlreadyRegistered": "مسجل بالفعل?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"SelfRegistrationDisabledMessage": "Vlastní registrace uživatele není povolena. K vytvoření účtu kontaktujte správce.",
"LocalLoginDisabledMessage": "Místní přihlášení je pro tuto aplikaci zakázáno.",
"Login": "Přihlásit",
"Cancel": "Zrušit",
"Register": "Registrovat",
"AreYouANewUser": "Jste nový uživatel?",
"AlreadyRegistered": "Jste už zaregistrovaní?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"SelfRegistrationDisabledMessage": "Selvregistrering er deaktiveret for denne applikation. Kontakt venligst applikationens administrator for at registrere en ny bruger.",
"LocalLoginDisabledMessage": "Lokalt login er deaktiveret for denne appliaktion.",
"Login": "Login",
"Cancel": "Annullér",
"Register": "Registrér",
"AreYouANewUser": "Er du ny bruger?",
"AlreadyRegistered": "Allerede registreret?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "Die Selbstregistrierung ist für diese Anwendung deaktiviert. Bitte wenden Sie sich an den Anwendungsadministrator, um einen neuen Benutzer zu registrieren.",
"LocalLoginDisabledMessage": "Die lokale Anmeldung ist für diese Anwendung deaktiviert.",
"Login": "Anmelden",
"Cancel": "Abbrechen",
"Register": "Registrieren",
"AreYouANewUser": "Sind Sie ein neuer Benutzer",
"AlreadyRegistered": "Bereits registriert?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"SelfRegistrationDisabledMessage": "Die Selbstregistrierung ist für diese Anwendung deaktiviert. Bitte wenden Sie sich an den Anwendungsadministrator, um einen neuen Benutzer zu registrieren.",
"LocalLoginDisabledMessage": "Die lokale Anmeldung ist für diese Anwendung deaktiviert.",
"Login": "Anmelden",
"Cancel": "Abbrechen",
"Register": "Registrieren",
"AreYouANewUser": "Neuer Benutzer?",
"AlreadyRegistered": "Bereits registriert?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "Η αυτοεγγραφή είναι απενεργοποιημένη για αυτήν την εφαρμογή. Επικοινωνήστε με τον διαχειριστή της εφαρμογής για να εγγραφείτε ως νέος χρήστης.",
"LocalLoginDisabledMessage": "Η τοπική σύνδεση είναι απενεργοποιημένη για αυτήν την εφαρμογή.",
"Login": "Σύνδεση",
"Cancel": "Ακύρωση",
"Register": "Εγγραφή",
"AreYouANewUser": "Είστε νέος χρήστης;",
"AlreadyRegistered": "Ήδη εγγεγραμμένος;",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"SelfRegistrationDisabledMessage": "Self-registration is disabled for this application. Please contact the application administrator to register a new user.",
"LocalLoginDisabledMessage": "Local login is disabled for this application.",
"Login": "Login",
"Cancel": "Cancel",
"Register": "Register",
"AreYouANewUser": "Are you a new user?",
"AlreadyRegistered": "Already registered?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "Self-registration is disabled for this application. Please contact the application administrator to register a new user.",
"LocalLoginDisabledMessage": "Local login is disabled for this application.",
"Login": "Login",
"Cancel": "Cancel",
"Register": "Register",
"AreYouANewUser": "Are you a new user?",
"AlreadyRegistered": "Already registered?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"LoginIsNotAllowed": "¡No está permitido iniciar sesión! Su cuenta está inactiva o necesita confirmar su correo electrónico/número de teléfono.",
"SelfRegistrationDisabledMessage": "El autoregistro de usuario está deshabilitado para esta aplicación. Póngase en contacto con el administrador de la aplicación para registrar un nuevo usuario.",
"Login": "Iniciar sesión",
"Cancel": "Cancelar",
"Register": "Registrar",
"InvalidLoginRequest": "Solicitud de inicio de sesión no válido",
"ThereAreNoLoginSchemesConfiguredForThisClient": "No hay ningún inicio de sesión esquemas configurado para este cliente.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "El autoregistro de usuario está deshabilitado para esta aplicación. Póngase en contacto con el administrador de la aplicación para registrar un nuevo usuario.",
"LocalLoginDisabledMessage": "Inicio de sesión local ha sido deshabilitado para esta aplicación",
"Login": "Iniciar sesión",
"Cancel": "Cancelar",
"Register": "Registrarse",
"AreYouANewUser": "¿Eres un usuario nuevo?",
"AlreadyRegistered": "¿Ya esta registrado?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "ثبت نام خودکار برای این برنامه غیرفعال است. لطفاً برای ثبت نام کاربر جدید با سرپرست برنامه تماس بگیرید.",
"LocalLoginDisabledMessage": "ورود محلی برای این برنامه غیرفعال است.",
"Login": "ورود کاربران",
"Cancel": "لغو",
"Register": "ثبت نام",
"AreYouANewUser": "قبلا ثبت نام نکرده اید؟",
"AlreadyRegistered": "قبلاً ثبت نام کرده اید؟",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "Itserekisteröinti on poistettu käytöstä tälle sovellukselle. Rekisteröi uusi käyttäjä ottamalla yhteyttä sovelluksen järjestelmänvalvojaan.",
"LocalLoginDisabledMessage": "Paikallinen sisäänkirjautuminen on poistettu käytöstä tälle sovellukselle.",
"Login": "Kirjaudu sisään",
"Cancel": "Peruuttaa",
"Register": "Rekisteröidy",
"AreYouANewUser": "Oletko uusi käyttäjä?",
"AlreadyRegistered": "Jo rekisteröity?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "L'auto-inscription est désactivée pour cette application. Veuillez contacter l'administrateur de l'application pour enregistrer un nouvel utilisateur.",
"LocalLoginDisabledMessage": "La connexion locale est désactivée pour cette application.",
"Login": "Connectez-vous",
"Cancel": "Annuler",
"Register": "S'inscrire",
"AreYouANewUser": "Êtes-vous un nouvel utilisateur?",
"AlreadyRegistered": "Déjà inscrit?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "इस आवेदन के लिए स्व-पंजीकरण अक्षम है। नया उपयोगकर्ता पंजीकृत करने के लिए कृपया एप्लिकेशन व्यवस्थापक से संपर्क करें।",
"LocalLoginDisabledMessage": "इस एप्लिकेशन के लिए स्थानीय लॉगिन अक्षम है।",
"Login": "लॉग इन करें",
"Cancel": "रद्द करना",
"Register": "रजिस्टर करें",
"AreYouANewUser": "क्या आप नए उपयोगकर्ता हैं?",
"AlreadyRegistered": "पहले से पंजीकृत?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"SelfRegistrationDisabledMessage": "Ennél az alkalmazásnál az önregisztráció le van tiltva. Új felhasználó regisztrálásához vegye fel a kapcsolatot az alkalmazás rendszergazdájával.",
"LocalLoginDisabledMessage": "A helyi bejelentkezés le van tiltva ennél az alkalmazásnál.",
"Login": "Bejelntkezés",
"Cancel": "Mégsem",
"Register": "Regisztráció",
"AreYouANewUser": "Őn új felhasználó?",
"AlreadyRegistered": "Már regisztrált?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"SelfRegistrationDisabledMessage": "Sjálfsskráning er óvirk fyrir þetta forrit. Vinsamlegast hafðu samband við umsjónarmann hugbúnaðarins til að skrá nýjan notanda.",
"LocalLoginDisabledMessage": "Staðbundin innskráning er óvirk fyrir þetta forrit.",
"Login": "Skrá inn",
"Cancel": "Hætta við",
"Register": "Skráðu þig",
"AreYouANewUser": "Ertu nýr notandi?",
"AlreadyRegistered": "Nú þegar skráð?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "L'auto-registrazione è disabilitata per questa applicazione. Contatta l'amministratore dell'applicazione per richiedere la registrazione.",
"LocalLoginDisabledMessage": "L'accesso locale è disabilitato per questa applicazione.",
"Login": "Accedi",
"Cancel": "Annulla",
"Register": "Registrati",
"AreYouANewUser": "Sei un nuovo utente?",
"AlreadyRegistered": "Già registrato?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"SelfRegistrationDisabledMessage": "Zelfregistratie is uitgeschakeld voor deze applicatie. Neem contact op met de applicatiebeheerder om een nieuwe gebruiker te registreren.",
"LocalLoginDisabledMessage": "Lokale aanmelding is uitgeschakeld voor deze applicatie.",
"Login": "Log in",
"Cancel": "Annuleer",
"Register": "Registreer",
"AreYouANewUser": "Bent u een nieuwe gebruiker?",
"AlreadyRegistered": "Al geregistreerd?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"SelfRegistrationDisabledMessage": "Rejestracja użytkowników jest wyłączona dla tej aplikacji. Skontaktuj się z administratorem aplikacji w celu rejestracji nowego użytkownika.",
"LocalLoginDisabledMessage": "Logowanie lokalne jest wyłączone dla tej aplikacji.",
"Login": "Zaloguj",
"Cancel": "Anuluj",
"Register": "Zarejestruj",
"AreYouANewUser": "Czy jesteś nowym użytkownikiem?",
"AlreadyRegistered": "Już zarejestrowany?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "Não é permitido que você crie uma nova conta neste site. Contate um administrador para que ele crie uma conta para você.",
"LocalLoginDisabledMessage": "O login local está desativado para este aplicativo.",
"Login": "Entrar",
"Cancel": "Cancelar",
"Register": "Registre-se",
"AreYouANewUser": "Você é um novo usuário?",
"AlreadyRegistered": "Já registrado?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"SelfRegistrationDisabledMessage": "Înregistrarea personală este dezactivată pentru această aplicaţie. Vă rugăm să contactaţi administratorul aplicaţiei pentru a înregistra un nou utilizator.",
"LocalLoginDisabledMessage": "Autentificarea locală este dezactivată pentru această aplicaţie.",
"Login": "Autentificare",
"Cancel": "Anulează",
"Register": "Înregistrare",
"AreYouANewUser": "Sunteţi un utilizator nou?",
"AlreadyRegistered": "Deja înregistrat?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"SelfRegistrationDisabledMessage": "Самостоятельная регистрация не предусмотрена. Пожалуйста, свяжитесь с администраром для получения доступа.",
"LocalLoginDisabledMessage": "Локальный вход отключен.",
"Login": "Войти",
"Cancel": "Отмена",
"Register": "Регистрация",
"AreYouANewUser": "Новый пользователь?",
"AlreadyRegistered": "Уже зарегистрированы?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "Samostatná registrácia je pre túto aplikáciu vypnutá. Ak chcete zaregistrovať nového používateľa, obráťte sa na správcu aplikácie.",
"LocalLoginDisabledMessage": "Lokálne prihlásenie je pre túto aplikáciu zakázané.",
"Login": "Prihlásiť",
"Cancel": "Zrušiť",
"Register": "Registrovať",
"AreYouANewUser": "Ste nový používateľ?",
"AlreadyRegistered": "Už ste zaregistrovaný?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "Možnost lastne registracije uporabnika je onemogočena za to aplikacijo. Kontaktirajte skrbnika aplikacije, da registrirate novega uporabnika.",
"LocalLoginDisabledMessage": "Lokalna prijava za to aplikacijo je onemogočena.",
"Login": "Prijava",
"Cancel": "Prekliči",
"Register": "Registracija",
"AreYouANewUser": "Ste nov uporabnik?",
"AlreadyRegistered": "Ste že registrirani?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "Bu uygulama için kullanıcıların kendi kendilerine kaydolmaları engellenmiştir. Yeni bir kullanıcı kaydetmek için lütfen uygulama yöneticisi ile iletişime geçin.",
"LocalLoginDisabledMessage": "Bu uygulama için local login devre dışı bırakılmıştır.",
"Login": "Giriş yap",
"Cancel": "İptal",
"Register": "Kayıt ol",
"AreYouANewUser": "Yeni bir kullanıcı mısınız?",
"AlreadyRegistered": "Zaten kayıtlı mı?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"SelfRegistrationDisabledMessage": "Tự đăng ký người dùng bị vô hiệu hóa cho ứng dụng này. Liên hệ với quản trị viên ứng dụng để đăng ký người dùng mới.",
"LocalLoginDisabledMessage": "Đăng nhập cục bộ bị vô hiệu hóa cho ứng dụng này.",
"Login": "Đăng nhập",
"Cancel": "Hủy bỏ",
"Register": "Đăng ký",
"AreYouANewUser": "Bạn có phải là người dùng mới?",
"AlreadyRegistered": "Đã đăng ký?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "应用程序未开放注册,请联系管理员添加新用户.",
"LocalLoginDisabledMessage": "应用程序未开放本地账户登录.",
"Login": "登录",
"Cancel": "取消",
"Register": "注册",
"AreYouANewUser": "你是新用户吗?",
"AlreadyRegistered": "已经注册过了?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"SelfRegistrationDisabledMessage": "應用程式未開放註冊,請聯絡管理員以加入新使用者.",
"LocalLoginDisabledMessage": "應用程序未開放本地賬戶登錄.",
"Login": "登入",
"Cancel": "取消",
"Register": "註冊",
"AreYouANewUser": "你是新使用者嗎?",
"AlreadyRegistered": "已經註冊過了?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ public override async Task<IActionResult> OnGetAsync()

if (context != null)
{
ShowCancelButton = true;

LoginInput.UserNameOrEmailAddress = context.LoginHint;

//TODO: Reference AspNetCore MultiTenancy module and use options to get the tenant key!
Expand Down Expand Up @@ -104,20 +102,6 @@ public override async Task<IActionResult> OnGetAsync()
public override async Task<IActionResult> OnPostAsync(string action)
{
var context = await Interaction.GetAuthorizationContextAsync(ReturnUrl);
if (action == "Cancel")
{
if (context == null)
{
return Redirect("~/");
}

await Interaction.GrantConsentAsync(context, new ConsentResponse()
{
Error = AuthorizationError.AccessDenied
});

return Redirect(ReturnUrl);
}

await CheckLocalLoginAsync();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"profiles": {
"Volo.Abp.Account.Web.IdentityServer": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:51203;http://localhost:51204"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ public async override Task<IActionResult> OnGetAsync()
var request = await OpenIddictRequestHelper.GetFromReturnUrlAsync(ReturnUrl);
if (request?.ClientId != null)
{
ShowCancelButton = true;

LoginInput.UserNameOrEmailAddress = request.LoginHint;

//TODO: Reference AspNetCore MultiTenancy module and use options to get the tenant key!
Expand All @@ -52,25 +50,6 @@ public async override Task<IActionResult> OnGetAsync()

public async override Task<IActionResult> OnPostAsync(string action)
{
if (action == "Cancel")
{
var request = await OpenIddictRequestHelper.GetFromReturnUrlAsync(ReturnUrl);

var transaction = HttpContext.GetOpenIddictServerTransaction();
if (request?.ClientId != null && transaction != null)
{
transaction.EndpointType = OpenIddictServerEndpointType.Authorization;
transaction.Request = request;

var notification = new OpenIddictServerEvents.ValidateAuthorizationRequestContext(transaction);
transaction.SetProperty(typeof(OpenIddictServerEvents.ValidateAuthorizationRequestContext).FullName!, notification);

return Forbid(OpenIddictServerAspNetCoreDefaults.AuthenticationScheme);
}

return Redirect("~/");
}

return await base.OnPostAsync(action);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"profiles": {
"Volo.Abp.Account.Web.OpenIddict": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:51205;http://localhost:51206"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@
</abp-row>
<div class="d-grid gap-2">
<abp-button type="submit" button-type="Primary" name="Action" value="Login" class="btn-lg mt-3">@L["Login"]</abp-button>
@if (Model.ShowCancelButton)
{
<abp-button type="submit" button-type="Secondary" formnovalidate="formnovalidate" name="Action" value="Cancel" class="btn-lg mt-3">@L["Cancel"]</abp-button>
}
</div>
</form>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ public class LoginModel : AccountPageModel
protected AbpAccountOptions AccountOptions { get; }
protected IOptions<IdentityOptions> IdentityOptions { get; }

public bool ShowCancelButton { get; set; }

public LoginModel(
IAuthenticationSchemeProvider schemeProvider,
IOptions<AbpAccountOptions> accountOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<abp-input asp-for="ResetToken"/>
<abp-input asp-for="Password"/>
<abp-input asp-for="ConfirmPassword"/>
<a abp-button="Secondary" asp-page="./Login">@L["Cancel"]</a>
<abp-button type="submit" button-type="Primary" text="@L["Submit"].Value"/>
</form>
</div>
Expand Down

0 comments on commit 8d840a5

Please sign in to comment.