mirror of https://github.com/abpframework/abp.git
6 changed files with 51 additions and 4 deletions
@ -0,0 +1,15 @@ |
|||
@page |
|||
@model Volo.Abp.Account.Web.Pages.Account.AccessDeniedModel |
|||
@using Microsoft.AspNetCore.Mvc.Localization |
|||
@using Volo.Abp.Account.Localization |
|||
@inject IHtmlLocalizer<AccountResource> L |
|||
|
|||
<div class="card mt-3 shadow-sm rounded"> |
|||
<div class="card-body p-5"> |
|||
<h4>@L["AccessDenied"]</h4> |
|||
<form method="post" class="mt-4"> |
|||
<p>@L["AccessDeniedMessage"]</p> |
|||
<a abp-button="Primary" asp-page="./Login" asp-all-route-data="@(new Dictionary<string, string> {{"returnUrl", Model.ReturnUrl}, {"returnUrlHash", Model.ReturnUrlHash}})">← @L["BackToLogin"]</a> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
@ -0,0 +1,24 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
|
|||
namespace Volo.Abp.Account.Web.Pages.Account |
|||
{ |
|||
public class AccessDeniedModel : AccountPageModel |
|||
{ |
|||
[BindProperty(SupportsGet = true)] |
|||
public string ReturnUrl { get; set; } |
|||
|
|||
[BindProperty(SupportsGet = true)] |
|||
public string ReturnUrlHash { get; set; } |
|||
|
|||
public virtual Task<IActionResult> OnGetAsync() |
|||
{ |
|||
return Task.FromResult<IActionResult>(Page()); |
|||
} |
|||
|
|||
public virtual Task<IActionResult> OnPostAsync() |
|||
{ |
|||
return Task.FromResult<IActionResult>(Page()); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue