diff --git a/common.props b/common.props index 8f5177c477..5254c91876 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 4.2.0-rc.2 + 4.3.0 $(NoWarn);CS1591;CS0436 https://abp.io/assets/abp_nupkg.png https://abp.io/ diff --git a/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/POST.md b/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/POST.md new file mode 100644 index 0000000000..28a42059fb --- /dev/null +++ b/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/POST.md @@ -0,0 +1,239 @@ +# ABP Framework 4.2 RC Has Been Published + +Today, we have released the [ABP Framework](https://abp.io/) and the [ABP Commercial](https://commercial.abp.io/) 4.2.0 RC (Release Candidate). This blog post introduces the new features and important changes in this new version. + +> **The planned release date for the [4.2.0 final](https://github.com/abpframework/abp/milestone/48) version is January 28, 2021**. + +## Get Started with the 4.2 RC + +If you want to try the version `4.2.0` today, follow the steps below; + +1) **Upgrade** the ABP CLI to the version `4.2.0-rc.1` using a command line terminal: + +````bash +dotnet tool update Volo.Abp.Cli -g --version 4.2.0-rc.1 +```` + +**or install** if you haven't installed before: + +````bash +dotnet tool install Volo.Abp.Cli -g --version 4.2.0-rc.1 +```` + +2) Create a **new application** with the `--preview` option: + +````bash +abp new BookStore --preview +```` + +See the [ABP CLI documentation](https://docs.abp.io/en/abp/latest/CLI) for all the available options. + +> You can also use the *Direct Download* tab on the [Get Started](https://abp.io/get-started) page by selecting the **Preview checkbox**. + +## What's new with the ABP Framework 4.2 + +## IRepository.GetQueryableAsync() + +> **This version comes with an important change about using `IQueryable` features over the [repositories](https://docs.abp.io/en/abp/4.2/Repositories). It is suggested to read this section carefully and apply in your applications.** + +`IRepository` interface inherits `IQueryable`, so you can directly use the standard LINQ extension methods, like `Where`, `OrderBy`, `First`, `Sum`... etc. + +**Example: Using LINQ directly over the repository object** + +````csharp +public class BookAppService : ApplicationService, IBookAppService +{ + private readonly IRepository _bookRepository; + + public BookAppService(IRepository bookRepository) + { + _bookRepository = bookRepository; + } + + public async Task DoItInOldWayAsync() + { + //Apply any standard LINQ extension method + var query = _bookRepository + .Where(x => x.Price > 10) + .OrderBy(x => x.Name); + + //Execute the query asynchronously + var books = await AsyncExecuter.ToListAsync(query); + } +} +```` + +*See [the documentation](https://docs.abp.io/en/abp/4.2/Repositories#iqueryable-async-operations) if you wonder what is the `AsyncExecuter`.* + +Beginning from the version 4.2, the recommended way is using `IRepository.GetQueryableAsync()` to obtain an `IQueryable`, then use the LINQ extension methods over it. + +**Example: Using the new GetQueryableAsync method** + +````csharp +public async Task DoItInNewWayAsync() +{ + //Use GetQueryableAsync to obtain the IQueryable first + var queryable = await _bookRepository.GetQueryableAsync(); + + //Then apply any standard LINQ extension method + var query = queryable + .Where(x => x.Price > 10) + .OrderBy(x => x.Name); + + //Finally, execute the query asynchronously + var books = await AsyncExecuter.ToListAsync(query); +} +```` + +ABP may start a database transaction when you get an `IQueryable` (If current [Unit Of Work](https://docs.abp.io/en/abp/latest/Unit-Of-Work) is transactional). In this new way, it is possible to **start the database transaction in an asynchronous way**. Previously, we could not get the advantage of asynchronous while starting the transactions. + +> **The new way has a significant performance and scalability gain. The old usage (directly using LINQ over the repositories) will be removed in the next major version.** You have a lot of time for the change, but we recommend to immediately take the action since the old usage has a big scalability problem. + +#### About IRepository Async Extension Methods + +Using IRepository Async Extension Methods has no such a problem. The examples below are pretty fine: + +````csharp +var countAll = await _personRepository + .CountAsync(); + +var count = await _personRepository + .CountAsync(x => x.Name.StartsWith("A")); + +var book1984 = await _bookRepository + .FirstOrDefaultAsync(x => x.Name == "John"); +```` + +See the [repository documentation](https://docs.abp.io/en/abp/4.2/Repositories#iqueryable-async-operations) to understand the relation between `IQueryable` and asynchronous operations. + +### Repository Bulk Operations + +This version adds the following methods to the repositories: + +* `InsertManyAsync` +* `UpdateManyAsync` +* `DeleteManyAsync` + +The purpose of these methods to insert, update or delete many entities in one call with a better performance. + +Currently, **MongoDB** provider implements these methods as a single bulk operation since MongoDB API natively supports. But current **Entity Framework Core** implementation is not a real bulk operation. Instead, it does its best with the native API of the EF Core. If you want to implement in a more performant way, you can [customize the bulk operations](https://docs.abp.io/en/abp/4.2/Entity-Framework-Core#customize-bulk-operations) with your own implementation or by using a library. We could find a good open source library for EF Core 5.0 to implement it. + +### Selecting DBMS on Template Creation + +[ABP CLI](https://docs.abp.io/en/abp/4.2/CLI#new) now has an option to specify the DBMS when you use EF Core as the database provider. + +**Example: Select MySQL as the DBMS** + +````bash +abp new BookStore -dbms mysql --preview +```` + +Available options: `SqlServer` (default), `MySQL`, `SQLite`, `Oracle-Devart`, `PostgreSQL`. See the [documentation](https://docs.abp.io/en/abp/latest/Entity-Framework-Core-Other-DBMS) to use any other DBMS or switch the DBMS later. + +> If you select a DBMS other than the SQL Server, then the database migrations are also created when you first run the `DbMigrator` application. In this case, do not run the application inside Visual Studio (or another IDE), but execute `dotnet run` command in a terminal in the folder of the `DbMigrator` project. + +### Swagger UI Login / Authorization + +Testing the swagger UI was requiring some additional work, especially your authentication server is separated from the application that hosts the Swagger UI. + +With the version 4.2, the startup templates come with the authorization pre-configured for you. An Authorize button is available when you open the Swagger UI: + +![swagger-authorize](swagger-authorize.png) + +When you click, it opens a modal to authorize: + +![swagger-authorize](swagger-authorize-modal.png) + +When you click to the Authorize button here, you are redirected to the login page to login with your username and password (default username is `admin` and password is `1q2w3E*`). + +> Remember to select the Scopes (typically **select all**) you want to use before clicking to the Authorize button. + +### Angular Unit Testing + +We've improved the modules and the startup template to setup and write unit tests easier with the Angular UI. See the [Angular Unit Testing document](https://docs.abp.io/en/abp/4.2/UI/Angular/Testing) for details. + +### Other News + +* Improved HTTP **request-response performance** by resolving dependencies in a deferred way in the action/page filters, interceptors and some other services. +* Removed `MultipleActiveResultSets` from connection strings for new templates for SQL Server, since the new EF Core gives a warning when using it. If you want to use it, you need to change the connection string yourself. +* Added `HardDeleteAsync` extension method that takes a predicate to delete multiple entities. This extension method is available if the entity [Soft Delete](https://docs.abp.io/en/abp/latest/Data-Filtering). +* Implemented the [Page Alerts](https://docs.abp.io/en/abp/4.2/UI/Angular/Page-Alerts) for the **Angular UI**. +* Implemented [Page Progress](https://docs.abp.io/en/abp/4.2/UI/Blazor/Page-Progress) for the **Blazor UI**. It automatically shows an undetermined progress bar on top of the page while performing an AJAX request. It also proves an API to you if you need to show/hide the progress bar in your code. + +## What's new with the ABP Commercial 4.2 + +### Microservice Startup Template + +The new [Microservice Startup Template](https://docs.abp.io/en/commercial/4.2/startup-templates/microservice/index) is a generic solution to start a new microservice solution. + +While we accept that every microservice solution will be different and every system has its own design requirements and trade-offs, we believe such a startup solution is a very useful starting point for most of the solutions, and a useful example for others. + +![microservice-template-diagram](microservice-template-diagram.png) + +*Figure: A simplified overall diagram of the microservice solution.* + +You can [follow the documentation](https://docs.abp.io/en/commercial/4.2/startup-templates/microservice/index) to get started with this startup template. **This template should be considered as an early release**. We will improve it and write a lot of guides. + +If you want to use the ABP Suite to create your solution, then you need to first upgrade it: + +````bash +abp suite update +```` + +If you want, you can directly create a new solution from the command line: + +````bash +abp new Volosoft.MyMicroserviceSystem -t microservice-pro --preview +```` + +Company Name is optional. Solution name could be *MyMicroserviceSystem* for this example. + +### Public Website in the Startup Templates + +As mentioned in the previous release post, we've added a *Public Website* application to the startup templates. It is configured to authenticate through the IdentityServer with a single sign-on system. + +You can use this application to create a landing page for your actual application or a corporate website for your business. An example screenshot: + +![public-website](public-website.jpg) + +It uses the same *Lepton Theme*, so you can apply [all the styles](https://commercial.abp.io/themes). The Public Website has a different layout and also has a different setting for the styling (that can be configured in the *Settings / Lepton Theme* page of the main web application). + +> *Public Website* is optional and you need to select the "Public Website" option while creating a new solution using the ABP Suite, or use the `--with-public-website` option while using the `abp new` CLI command. + +### Easy CRM Blazor UI + +[Easy CRM](https://docs.abp.io/en/commercial/latest/samples/easy-crm) is an example application built with the ABP Commercial. MVC (Razor Pages) and Angular UI implementations were already provided. With the version 4.2, we are providing the Blazor UI implementation for this application. + +![easy-crm](easy-crm.png) + +### Other News + +* Implemented Iyzico as a payment gateway provider for the [payment module](https://commercial.abp.io/modules/Volo.Payment) in addition to Paypal, Stripe, 2Checkout and Payu providers. +* ABP Suite supports the new microservice template creation, public website and DBMS selection options. +* Swagger authorization and other features mentioned in the ABP Framework section are already implemented for the ABP Commercial too. + +## ABP Community News + +### Sharing Video Contents + +[community.abp.io](https://community.abp.io/) is a place to share ABP related contents. It started with publishing articles. Now, it supports to publish video contents. [See this example](https://community.abp.io/articles/be-a-superhero-on-day-1-with-abp.io-wvifcy9s). All you need to do is to create a video and upload to YouTube. Then you can [submit](https://community.abp.io/articles/submit) the YouTube link to the ABP Community website. + +### Multi-language support + +We planned ABP Community to publish English-only contents. However, we see that people want to share contents in other languages too. Now, **it is possible to submit a content in any language**. Just select the Language option while submitting your content. + +**When you submit a non-English content, it is not visible to all the visitors by default**. Visitors can see a non-English content only if their browser language or the selected language matches to the content language (there is a language selection at the end of the website). + +### External Contents + +If you want to publish your content anywhere else, but want to post a link of your content, you can select *External Content* option while submitting the post. For example, [this article](https://community.abp.io/articles/aspnet-boilerplate-to-abp-framework-xml-to-json-localization-conversion-0mxyjrzj) is an external article and also written in Chinese language. + +## About the Next Release + +The next feature version will be 4.3.0. It is planned to release the 4.3 RC (Release Candidate) on March 11 and the final version on March 25, 2021. + +We decided to slow down the feature development for the [next milestone](https://github.com/abpframework/abp/milestone/49). We will continue to improve the existing features and introduce new ones, sure, but wanted to have more time for the planning, documentation, creating guides and improving the development experience. + +## Feedback + +Please check out the ABP Framework 4.2.0 RC and [provide feedback](https://github.com/abpframework/abp/issues/new) to help us to release a more stable version. **The planned release date for the [4.2.0 final](https://github.com/abpframework/abp/milestone/48) version is January 28, 2021**. diff --git a/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/easy-crm.png b/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/easy-crm.png new file mode 100644 index 0000000000..02c47777a4 Binary files /dev/null and b/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/easy-crm.png differ diff --git a/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/microservice-template-diagram.png b/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/microservice-template-diagram.png new file mode 100644 index 0000000000..2c6df5ab74 Binary files /dev/null and b/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/microservice-template-diagram.png differ diff --git a/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/public-website.jpg b/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/public-website.jpg new file mode 100644 index 0000000000..b5784519bd Binary files /dev/null and b/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/public-website.jpg differ diff --git a/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/swagger-authorize-modal.png b/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/swagger-authorize-modal.png new file mode 100644 index 0000000000..52b43f248e Binary files /dev/null and b/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/swagger-authorize-modal.png differ diff --git a/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/swagger-authorize.png b/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/swagger-authorize.png new file mode 100644 index 0000000000..650a212fe5 Binary files /dev/null and b/docs/en/Blog-Posts/2021-01-14 v4_2_Preview/swagger-authorize.png differ diff --git a/docs/zh-Hans/Domain-Driven-Design-Implementation-Guide.md b/docs/zh-Hans/Domain-Driven-Design-Implementation-Guide.md index db434ab365..81755fbf0d 100644 --- a/docs/zh-Hans/Domain-Driven-Design-Implementation-Guide.md +++ b/docs/zh-Hans/Domain-Driven-Design-Implementation-Guide.md @@ -1767,7 +1767,7 @@ public async Task ChangeTitleAsync(Issue issue, string title) 如前所述,领域驱动设计中的*业务逻辑*分为两部分(各层):领域逻辑和应用逻辑 -![domain-driven-design-domain-vs-application-logic](../../../abpframework.abp/docs/en/images/domain-driven-design-domain-vs-application-logic.png) +![domain-driven-design-domain-vs-application-logic](images/domain-driven-design-domain-vs-application-logic.png) 领域逻辑是系统的*核心领域规则*组成,而应用逻辑则满足特定的*用例*. @@ -1783,7 +1783,7 @@ public async Task ChangeTitleAsync(Issue issue, string title) * 一个**后台管理系统**,UI使用Angular,通过REST API请求数据.内部员工使用这个系统来维护数据(例如,编辑商品说明). * 一个**移动端应用程序**,它比公开的网站UI上更加简洁.它通过REST API或其它技术(例如,TCP sockets)请求数据. -![domain-driven-design-multiple-applications](../../../abpframework.abp/docs/en/images/domain-driven-design-multiple-applications.png) +![domain-driven-design-multiple-applications](images/domain-driven-design-multiple-applications.png) 每个应用程序都有不同的**需求**,不同的**用例**(应用服务方法),不同的DTO,不同的**验证**和**授权**规则等. diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json index 755cd5674b..459d115398 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json @@ -60,6 +60,8 @@ "Volo.Account:InvalidEmailAddress": "Can not find the given email address: {0}", "PasswordReset": "Password reset", "PasswordResetInfoInEmail": "We received an account recovery request! If you initiated this request, click the following link to reset your password.", - "ResetMyPassword": "Reset my password" + "ResetMyPassword": "Reset my password", + "AccessDenied": "Access denied!", + "AccessDeniedMessage": "You do not have access to this resource." } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json index d8cf5dd74f..a1c899357b 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json @@ -60,6 +60,8 @@ "Volo.Account:InvalidEmailAddress": "Email adresi bulunamadı: {0}", "PasswordReset": "Şifre Sıfırlama", "PasswordResetInfoInEmail": "Şifrenizi sıfırlamanız için bir talep aldık! Eğer bu talebi siz gerçekleştirmişseniz, şifrenizi sıfırlamak için bağlantıya tıklayın.", - "ResetMyPassword": "Şifremi sıfırla" + "ResetMyPassword": "Şifremi sıfırla", + "AccessDenied": "Erişim reddedildi!", + "AccessDeniedMessage": "Bu kaynağa erişiminiz yok." } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json index 53fe6135f2..26c6fc3337 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json @@ -60,6 +60,8 @@ "Volo.Account:InvalidEmailAddress": "找不到给定的电子邮件地址:{0}", "PasswordReset": "重设密码", "PasswordResetInfoInEmail": "我们收到了帐户恢复请求!如果你发起了此请求,请单击以下链接以重置密码.", - "ResetMyPassword": "重置我的密码" + "ResetMyPassword": "重置我的密码", + "AccessDenied": "拒绝访问!", + "AccessDeniedMessage": "你无权访问此资源." } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json index a67ea8d63f..8a57429344 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json @@ -58,6 +58,8 @@ "ReturnToApplication": "返回到應用程序", "PasswordReset": "重設密碼", "PasswordResetInfoInEmail": "我們收到了帳戶恢復請求!如果你發起了此請求,請單擊以下鏈接以重置密碼.", - "ResetMyPassword": "重置我的密碼" + "ResetMyPassword": "重置我的密碼", + "AccessDenied": "拒絕訪問!", + "AccessDeniedMessage": "您無權訪問此資源." } } diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs index 3d7381d2c3..4dab1f9761 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs @@ -103,9 +103,9 @@ namespace Volo.Abp.Account.Web.Pages.Account public override async Task OnPostAsync(string action) { + var context = await Interaction.GetAuthorizationContextAsync(ReturnUrl); if (action == "Cancel") { - var context = await Interaction.GetAuthorizationContextAsync(ReturnUrl); if (context == null) { return Redirect("~/"); @@ -142,7 +142,8 @@ namespace Volo.Abp.Account.Web.Pages.Account { Identity = IdentitySecurityLogIdentityConsts.Identity, Action = result.ToIdentitySecurityLogAction(), - UserName = LoginInput.UserNameOrEmailAddress + UserName = LoginInput.UserNameOrEmailAddress, + ClientId = context?.Client?.ClientId }); if (result.RequiresTwoFactor) diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLogoutModel.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLogoutModel.cs index 26ee0d4c34..94860e80c1 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLogoutModel.cs +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLogoutModel.cs @@ -20,12 +20,6 @@ namespace Volo.Abp.Account.Web.Pages.Account public async override Task OnGetAsync() { - await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext() - { - Identity = IdentitySecurityLogIdentityConsts.Identity, - Action = IdentitySecurityLogActionConsts.Logout - }); - await SignInManager.SignOutAsync(); var logoutId = Request.Query["logoutId"].ToString(); @@ -33,11 +27,14 @@ namespace Volo.Abp.Account.Web.Pages.Account if (!string.IsNullOrEmpty(logoutId)) { var logoutContext = await Interaction.GetLogoutContextAsync(logoutId); + + await SaveSecurityLogAsync(logoutContext?.ClientId); + await SignInManager.SignOutAsync(); HttpContext.User = new ClaimsPrincipal(new ClaimsIdentity()); - LoggedOutModel vm = new LoggedOutModel() + var vm = new LoggedOutModel() { PostLogoutRedirectUri = logoutContext?.PostLogoutRedirectUri, ClientName = logoutContext?.ClientName, @@ -49,6 +46,8 @@ namespace Volo.Abp.Account.Web.Pages.Account return RedirectToPage("./LoggedOut", vm); } + await SaveSecurityLogAsync(); + if (ReturnUrl != null) { return LocalRedirect(ReturnUrl); @@ -58,5 +57,18 @@ namespace Volo.Abp.Account.Web.Pages.Account $"IdentityServerSupportedLogoutModel couldn't find postLogoutUri... Redirecting to:/Account/Login.."); return RedirectToPage("/Account/Login"); } + + protected virtual async Task SaveSecurityLogAsync(string clientId = null) + { + if (CurrentUser.IsAuthenticated) + { + await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext() + { + Identity = IdentitySecurityLogIdentityConsts.Identity, + Action = IdentitySecurityLogActionConsts.Logout, + ClientId = clientId + }); + } + } } } diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccessDenied.cshtml b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccessDenied.cshtml new file mode 100644 index 0000000000..28608ff883 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccessDenied.cshtml @@ -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 L + +
+
+

@L["AccessDenied"]

+
+

@L["AccessDeniedMessage"]

+ ← @L["BackToLogin"] +
+
+
diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccessDenied.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccessDenied.cshtml.cs new file mode 100644 index 0000000000..7ac9639d0b --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccessDenied.cshtml.cs @@ -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 OnGetAsync() + { + return Task.FromResult(Page()); + } + + public virtual Task OnPostAsync() + { + return Task.FromResult(Page()); + } + } +}