diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json index e898619b64..205bc10d05 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json @@ -26,6 +26,8 @@ "Volo.AbpIo.Domain:030009": "User not found!", "Volo.AbpIo.Domain:030010": "To purchase the trial license, you first need to activate your trial license!", "Volo.AbpIo.Domain:030011": "You cannot delete a trial license when it is purchased!", + "Volo.AbpIo.Domain:070000": "The organization name can only contain latin letters, numbers, dots and hyphens!", + "Volo.AbpIo.Domain:070001": "The company name can only contain latin letters, numbers, dots, space and hyphens!", "WantToLearn?": "Want to learn?", "ReadyToGetStarted?": "Ready to get started?", "JoinOurCommunity": "Join our community", diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json index 5a63ea7869..574859c334 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json @@ -379,8 +379,6 @@ "TaxNoValidationMessage": "TAX/VAT No is too long!", "NotesValidationMessage": "Notes field is too long!", "CheckYourBillingInfo": "You can create your invoice only once! Check your billing information before creating your invoice.", - "Volo.AbpIo.Commercial:030000": "You already used your trial period.", - "Volo.AbpIo.Commercial:030001": "This organization name already exists.", "StartYourFreeTrial": "Start your free trial", "TrialLicenseModelInvalidErrorMessage": "One of the following fields is invalid: Country Name, Company Size, Industry or Purpose Of Usage.", "Trial": "Trial", @@ -488,10 +486,8 @@ "BackOfficeApplicationExplanation": "The actual web application of your system, with multiple UI framework options. You can create any kind of business application.", "LandingWebsite": "Landing Website", "LandingWebsiteExplanation": "A generic landing/public website that can be used for several purposes, like introducing your company, selling your products, etc.", - "ABPFrameworkEBook": "E-Book: Mastering ABP Framework", + "ABPFrameworkEBook": "Mastering ABP Framework e-book", "MasteringAbpFrameworkEBookDescription": "Included within your ABP Commercial license", - "Volo.AbpIo.Domain:070000": "The organization name can only contain latin letters, numbers, dots and hyphens!", - "Volo.AbpIo.Domain:070001": "The company name can only contain latin letters, numbers, dots, space and hyphens!", "FullName": "Full Name", "LicenseTypeNotCorrect": "The license type is not correct!", "Trainings": "Trainings", @@ -508,6 +504,31 @@ "OnboardingTrainingFaqExplanation": "Yes, we have ABP Training Services to help you get your ABP project started fast. You will learn about ABP from an ABP core team member and you will get the skills to begin your ABP project. In the onboarding training, we will explain how to set up your development environment, install the required tools, create a fully functional CRUD page. The training will be live and the Zoom application will be used, and we are open to using other online meeting platforms. The language of the training will be English. You can also ask your questions about ABP during the sessions. A convenient time and date will be planned for both parties. To get more information, contact us at info@abp.io.", "AddBasket": "Add to Basket", "SendTrainingRequest": "Send Training Request", - "OnlyEnglishVersionOfThisDocumentIsTheRecentAndValid": "* The English version of this document is the most up-to-date and the English version will prevail in any dispute." + "OnlyEnglishVersionOfThisDocumentIsTheRecentAndValid": "* The English version of this document is the most up-to-date and the English version will prevail in any dispute.", + "Pricing_Page_Title": "Plans & Pricing", + "Pricing_Page_Description": "Choose the features and functionality your business needs today. Buy an ABP Commercial license and create unlimited projects.", + "Pricing_Page_HurryUp": "Hurry Up!", + "Pricing_Page_BuyLicense": "Buy a license at 2021 prices until January 16!", + "Pricing_Page_ValidForExistingCustomers": "Also valid for existing customers and license renewals.", + "Pricing_Page_Hint1": "The license price includes a certain number of developer seats. If you have more developers, you can always purchase additional seats.", + "Pricing_Page_Hint2": "You can purchase more developer licenses now or in the future. Licenses are seat based, so you can transfer a seat from a developer to another.", + "Pricing_Page_Hint3": "You can develop unlimited count of different products with your license.", + "Pricing_Page_Hint4": "ABP Suite is a tool to assist your development to improve your productivity. It supports generating CRUD pages and creating new projects.", + "Pricing_Page_Hint5": "You can use all the pre-built modules in your applications.", + "Pricing_Page_Hint6": "You can use all the pre-built themes in your applications.", + "Pricing_Page_Hint7": "A startup template is a Visual Studio solution to make you jump-start to your project. All fundamental modules are added and pre-configured for you.", + "Pricing_Page_Hint8": "Mastering ABP Framework e-book explains how to implement .NET solutions with best practices. It is sold on Amazon.com and you can download the book for free within your license.", + "Pricing_Page_Hint9": "You can download the source-code of any module. You may want to add the source code to your solution to make radical changes or just keep it for yourself for security reasons.", + "Pricing_Page_Hint10": "Licenses are for lifetime. That means you can continue to develop your application forever. Accessing to the latest version and getting support are granted within the license period (1 year unless you renew it).", + "Pricing_Page_Hint11": "No restrictions on deployment! You can deploy to as many servers as you want, including the cloud services or on-premises.", + "Pricing_Page_Hint12": "You can update the modules, themes and tools to the latest version within your active license period. After your license expires, you need to renew it, to continue to get updates for bug fixes, new features and enhancements.", + "Pricing_Page_Hint13": "You can get the premium support for one year (you can renew your license to extend it).", + "Pricing_Page_Hint14": "Team and Business licenses have incident/question count limit. If you buy additional developer licenses, your incident limit increases by {0} (for the Team License) or {1} (for the Business License) per developer.", + "Pricing_Page_Hint15": "Only Enterprise License includes private support. You can send e-mail directly to the ABP Team or ask questions on support.abp.io with private ticket option. The private tickets are not visible to the public.", + "Pricing_Page_Hint16": "You can download the source-code of all ABP themes. You may want to add the source code to your solution to make radical changes or just keep it for yourself for security reasons.", + "Pricing_Page_Testimonial_1": "ABP Commercial allowed SC Ventures to deliver a bank-grade multi-tenant silo-database SaaS platform in 9 months to support the accounts receivable / accounts payable supply chain financing of significant value invoices from multiple integrated anchors. The modularity of ABP made it possible for the team to deliver in record time, pass all VAPT, and deploy the containerized micro-services stack via full CI/CD and pipelines into production.", + "Pricing_Page_Testimonial_2": "We are seeing the value of using ABP Commercial to reduce the overhead of custom development projects. And the team is able to unify the code pattern in different project streams. We see more potential in the framework for us to build new features faster than before. We trust we will be constantly seeing the value of leveraging ABP Commercial.", + "Pricing_Page_Testimonial_3": "We love ABP. We don't have to write everything from scratch. We start from out-of-the-box features and just focus on what we really need to write. Also, ABP is well-architected and the code is high quality with fewer bugs. If we would have to write everything we needed on our own, we might have to spend years. Once more things we like is that the new version, or issue fixing, or improvement come out very soon every other week. We don't wait too long.", + "Pricing_Page_Testimonial_4": "ABP Commercial is a fantastic product would recommend. Commercial products to market for our customers in a single configurable platform. The jump start that the framework and tooling provide any team is worth every cent. ABP Commercial was the best fit for our needs." } } diff --git a/docs/en/Microservice-Architecture.md b/docs/en/Microservice-Architecture.md index 7790e26f3c..b98323908d 100644 --- a/docs/en/Microservice-Architecture.md +++ b/docs/en/Microservice-Architecture.md @@ -23,8 +23,8 @@ One common advise to start a new solution is **always to start with a monolith** However, developing such a well-modular application can be a problem since it is **hard to keep modules isolated** from each other as you would do it for microservices (see [Stefan Tilkov's article](https://martinfowler.com/articles/dont-start-monolith.html) about that). Microservice architecture naturally forces you to develop well isolated services, but in a modular monolithic application it's easy to tight couple modules to each other and design **weak module boundaries** and API contracts. -ABP can help you in that point by offerring a **microservice-compatible, strict module architecture** where your module is splitted into multiple layers/projects and developed in its own VS solution completely isolated and independent from other modules. Such a developed module is a natural microservice yet it can be easily plugged-in a monolithic application. See the [module development best practice guide](Best-Practices/Index.md) that offers a **microservice-first module design**. All [standard ABP modules](https://github.com/abpframework/abp/tree/master/modules) are developed based on this guide. So, you can use these modules by embedding into your monolithic solution or deploy them separately and use via remote APIs. They can share a single database or can have their own database based on your simple configuration. +ABP can help you in that point by offering a **microservice-compatible, strict module architecture** where your module is split into multiple layers/projects and developed in its own VS solution completely isolated and independent from other modules. Such a developed module is a natural microservice yet it can be easily plugged-in a monolithic application. See the [module development best practice guide](Best-Practices/Index.md) that offers a **microservice-first module design**. All [standard ABP modules](https://github.com/abpframework/abp/tree/master/modules) are developed based on this guide. So, you can use these modules by embedding into your monolithic solution or deploy them separately and use via remote APIs. They can share a single database or can have their own database based on your simple configuration. -## Microservice Demo Solution +## Microservice Demo Solution: eShopOnAbp -The [sample microservice solution](Samples/Microservice-Demo.md) demonstrates a complete microservice solution based on the ABP framework. +The [eShopOnAbp project](https://github.com/abpframework/eShopOnAbp) demonstrates a complete microservice solution based on the ABP framework. diff --git a/docs/en/Samples/Index.md b/docs/en/Samples/Index.md index 58543ba380..704cdf3808 100644 --- a/docs/en/Samples/Index.md +++ b/docs/en/Samples/Index.md @@ -2,15 +2,19 @@ Here, a list of official samples built with the ABP Framework. Most of these samples are located under the [abpframework/abp-samples](https://github.com/abpframework/abp-samples) GitHub repository. -### Microservice Demo +## eShopOnAbp -A complete solution to demonstrate how to build systems based on the microservice architecture. +Reference microservice solution built with the ABP Framework and .NET. -* [The complete documentation for this sample](Microservice-Demo.md) -* [Source code](https://github.com/abpframework/abp-samples/tree/master/MicroserviceDemo) -* [Microservice architecture document](../Microservice-Architecture.md) +* [Source code](https://github.com/abpframework/eShopOnAbp) -### Book Store +## EventHub + +This is a reference application built with the ABP Framework. It implements the Domain Driven Design with multiple application layers. + +* [Source code](https://github.com/abpframework/eventhub) + +## Book Store A simple CRUD application to show basic principles of developing an application with the ABP Framework. The same sample was implemented with different technologies: @@ -28,7 +32,7 @@ A simple CRUD application to show basic principles of developing an application While there is no Razor Pages & MongoDB combination, you can check both documents to understand it since DB & UI selection don't effect each other. -### Other Samples +## Other Samples * **Event Organizer**: A sample application to create events (meetups) and allow others to register the events. Developed using EF Core and Blazor UI. * [Source code](https://github.com/abpframework/abp-samples/tree/master/EventOrganizer) diff --git a/docs/en/Samples/Microservice-Demo.md b/docs/en/Samples/Microservice-Demo.md index 285c2b10a0..1e2549338f 100644 --- a/docs/en/Samples/Microservice-Demo.md +++ b/docs/en/Samples/Microservice-Demo.md @@ -1,5 +1,7 @@ # Microservice Demo Solution +> This solution is no longer maintained. See [the eShopOnAbp project](https://github.com/abpframework/eShopOnAbp) for the replacement solution. + *"Microservices are a software development technique—a variant of the **service-oriented architecture** (SOA) architectural style that structures an application as a collection of **loosely coupled services**. In a microservices architecture, services are **fine-grained** and the protocols are **lightweight**. The benefit of decomposing an application into different smaller services is that it improves **modularity**. This makes the application easier to understand, develop, test, and become more resilient to architecture erosion. It **parallelizes development** by enabling small autonomous teams to **develop, deploy and scale** their respective services independently. It also allows the architecture of an individual service to emerge through **continuous refactoring**. Microservices-based architectures enable **continuous delivery and deployment**."* — [Wikipedia](https://en.wikipedia.org/wiki/Microservices) diff --git a/docs/en/Startup-Templates/Application.md b/docs/en/Startup-Templates/Application.md index 0f4372b621..a262ef2d88 100644 --- a/docs/en/Startup-Templates/Application.md +++ b/docs/en/Startup-Templates/Application.md @@ -13,7 +13,7 @@ This document explains **the solution structure** and projects in details. If yo You can use the [ABP CLI](../CLI.md) to create a new project using this startup template. Alternatively, you can directly create & download from the [Get Started](https://abp.io/get-started) page. CLI approach is used here. -First, install the ABP CLI if you haven't installed before: +First, install the ABP CLI if you haven't installed it before: ````bash dotnet tool install -g Volo.Abp.Cli @@ -25,8 +25,8 @@ Then use the `abp new` command in an empty folder to create a new solution: abp new Acme.BookStore -t app ```` -* `Acme.BookStore` is the solution name, like *YourCompany.YourProduct*. You can use single level, two-levels or three-levels naming. -* This example specified the template name (`-t` or `--template` option). However, `app` is already the default template if you don't specify it. +* `Acme.BookStore` is the solution name, like *YourCompany.YourProduct*. You can use single-level, two-level or three-level naming. +* This example specified the template name (`-t` or `--template` option). However, `app` is already the default template if you didn't specify it. ### Specify the UI Framework @@ -36,7 +36,7 @@ This template provides multiple UI frameworks: * `blazor`: Blazor UI * `angular`: Angular UI -Use `-u` or `--ui` option to specify the UI framework: +Use the `-u` or `--ui` option to specify the UI framework: ````bash abp new Acme.BookStore -u angular @@ -61,7 +61,7 @@ This template supports the following mobile application frameworks: - `react-native`: React Native -Use `-m` (or `--mobile`) option to specify the mobile application framework: +Use the `-m` (or `--mobile`) option to specify the mobile application framework: ````bash abp new Acme.BookStore -m react-native @@ -75,7 +75,7 @@ Based on the options you've specified, you will get a slightly different solutio ### Default Structure -If you don't specify any additional option, you will have a solution like shown below: +If you don't specify any additional options, you will have a solution as shown below: ![bookstore-visual-studio-solution-v3](../images/bookstore-visual-studio-solution-v3.png) @@ -93,7 +93,7 @@ This project contains constants, enums and other objects these are actually a pa A `BookType` enum and a `BookConsts` class (which may have some constant fields for the `Book` entity, like `MaxNameLength`) are good candidates for this project. -* This project has no dependency to other projects in the solution. All other projects depend on this directly or indirectly. +* This project has no dependency on other projects in the solution. All other projects depend on this one directly or indirectly. #### .Domain Project @@ -105,7 +105,7 @@ A `Book` entity, a `BookManager` domain service and an `IBookRepository` interfa #### .Application.Contracts Project -This project mainly contains [application service](../Application-Services.md) **interfaces** and [Data Transfer Objects](../Data-Transfer-Objects.md) (DTO) of the application layer. It does exists to separate interface & implementation of the application layer. In this way, the interface project can be shared to the clients as a contract package. +This project mainly contains [application service](../Application-Services.md) **interfaces** and [Data Transfer Objects](../Data-Transfer-Objects.md) (DTO) of the application layer. It exists to separate the interface & implementation of the application layer. In this way, the interface project can be shared to the clients as a contract package. An `IBookAppService` interface and a `BookCreationDto` class are good candidates for this project. @@ -130,7 +130,7 @@ This is the integration project for the EF Core. It defines the `DbContext` and #### .DbMigrator Project -This is a console application which simplifies to execute database migrations on development and production environments. When you run this application, it; +This is a console application that simplifies the execution of database migrations on development and production environments. When you run this application, it: * Creates the database if necessary. * Applies the pending database migrations. @@ -140,24 +140,24 @@ This is a console application which simplifies to execute database migrations on Especially, seeding initial data is important at this point. ABP has a modular data seed infrastructure. See [its documentation](../Data-Seeding.md) for more about the data seeding. -While creating database & applying migrations seems only necessary for relational databases, this projects comes even if you choose a NoSQL database provider (like MongoDB). In that case, it still seeds initial data which is necessary for the application. +While creating database & applying migrations seem only necessary for relational databases, this project comes even if you choose a NoSQL database provider (like MongoDB). In that case, it still seeds the initial data which is necessary for the application. * Depends on the `.EntityFrameworkCore` project (for EF Core) since it needs to access to the migrations. -* Depends on the `.Application.Contracts` project to be able to access permission definitions, because initial data seeder grants all permissions for the admin role by default. +* Depends on the `.Application.Contracts` project to be able to access permission definitions, because the initial data seeder grants all permissions to the admin role by default. #### .HttpApi Project This project is used to define your API Controllers. -Most of time you don't need to manually define API Controllers since ABP's [Auto API Controllers](../API/Auto-API-Controllers.md) feature creates them automagically based on your application layer. However, in case of you need to write API controllers, this is the best place to do it. +Most of the time you don't need to manually define API Controllers since ABP's [Auto API Controllers](../API/Auto-API-Controllers.md) feature creates them automagically based on your application layer. However, in case of you need to write API controllers, this is the best place to do it. * Depends on the `.Application.Contracts` project to be able to inject the application service interfaces. #### .HttpApi.Client Project -This is a project that defines C# client proxies to use the HTTP APIs of the solution. You can share this library to 3rd-party clients, so they can easily consume your HTTP APIs in their Dotnet applications (For other type of applications, they can still use your APIs, either manually or using a tool in their own platform) +This is a project that defines C# client proxies to use the HTTP APIs of the solution. You can share this library to 3rd-party clients, so they can easily consume your HTTP APIs in their Dotnet applications (For other types of applications, they can still use your APIs, either manually or using a tool in their own platform) -Most of time you don't need to manually create C# client proxies, thanks to ABP's [Dynamic C# API Clients](../API/Dynamic-CSharp-API-Clients.md) feature. +Most of the time you don't need to manually create C# client proxies, thanks to ABP's [Dynamic C# API Clients](../API/Dynamic-CSharp-API-Clients.md) feature. `.HttpApi.Client.ConsoleTestApp` project is a console application created to demonstrate the usage of the client proxies. @@ -169,17 +169,17 @@ Most of time you don't need to manually create C# client proxies, thanks to ABP' This project contains the User Interface (UI) of the application if you are using ASP.NET Core MVC UI. It contains Razor pages, JavaScript files, CSS files, images and so on... -This project contains the main `appsettings.json` file that contains the connection string and other configuration of the application. +This project contains the main `appsettings.json` file that contains the connection string and other configurations of the application. -* Depends on the `.HttpApi` since UI layer needs to use APIs and application service interfaces of the solution. +* Depends on the `.HttpApi` project since the UI layer needs to use APIs and the application service interfaces of the solution. > If you check the source code of the `.Web.csproj` file, you will see the references to the `.Application` and the `.EntityFrameworkCore` projects. > -> These references are actually not needed while coding your UI layer, because UI layer normally doesn't depend on the EF Core or the Application layer's implementation. This startup templates are ready for the tiered deployment, where API layer is hosted in a separate server than the UI layer. +> These references are actually not needed while coding your UI layer, because the UI layer normally doesn't depend on the EF Core or the Application layer's implementation. These startup templates are ready for tiered deployment, where the API layer is hosted on a separate server than the UI layer. > > However, if you don't choose the `--tiered` option, these references will be in the .Web project to be able to host the Web, API and application layers in a single application endpoint. > -> This gives you to ability to use domain entities & repositories in your presentation layer. However, this is considered as a bad practice according to the DDD. +> This gives you the ability to use domain entities & repositories in your presentation layer. However, this is considered as a bad practice according to DDD. #### Test Projects @@ -195,32 +195,32 @@ In addition, `.HttpApi.Client.ConsoleTestApp` is a console application (not an a Test projects are prepared for integration testing; -* It is fully integrated to ABP framework and all services in your application. +* It is fully integrated into the ABP framework and all services in your application. * It uses SQLite in-memory database for EF Core. For MongoDB, it uses the [Mongo2Go](https://github.com/Mongo2Go/Mongo2Go) library. * Authorization is disabled, so any application service can be easily used in tests. -You can still create unit tests for your classes which will be harder to write (because you will need to prepare mock/fake objects), but faster to run (because it only tests a single class and skips all initialization process). +You can still create unit tests for your classes which will be harder to write (because you will need to prepare mock/fake objects), but faster to run (because it only tests a single class and skips all the initialization processes). #### How to Run? -Set `.Web` as the startup project and run the application. Default username is `admin` and password is `1q2w3E*`. +Set `.Web` as the startup project and run the application. The default username is `admin` and the password is `1q2w3E*`. See [Getting Started With the ASP.NET Core MVC Template](../Getting-Started-AspNetCore-MVC-Template.md) for more information. ### Tiered Structure -If you have selected the ASP.NET Core UI and specified the `--tiered` option, the solution created will be a tiered solution. The purpose of the tiered structure is to be able to **deploy Web application and HTTP API to different servers**: +If you have selected the ASP.NET Core UI and specified the `--tiered` option, the solution created will be a tiered solution. The purpose of the tiered structure is to be able to **deploy Web applications and HTTP API to different servers**: ![bookstore-visual-studio-solution-v3](../images/tiered-solution-servers.png) * Browser runs your UI by executing HTML, CSS & JavaScript. -* Web servers hosts static UI files (CSS, JavaScript, image... etc.) & dynamic components (e.g. Razor pages). It performs HTTP requests to the API server to execute the business logic of the application. -* API Server hosts the HTTP APIs which then use application & domain layers of the application to perform the business logic. +* Web servers host static UI files (CSS, JavaScript, image... etc.) & dynamic components (e.g. Razor pages). It performs HTTP requests to the API server to execute the business logic of the application. +* The API Server hosts the HTTP APIs which then use the application & domain layers of the application to perform the business logic. * Finally, database server hosts your database. So, the resulting solution allows a 4-tiered deployment, by comparing to 3-tiered deployment of the default structure explained before. -> Unless you actually need to such a 4-tiered deployment, its suggested to go with the default structure which is simpler to develop, deploy and maintain. +> Unless you actually need such a 4-tiered deployment, it's suggested to go with the default structure which is simpler to develop, deploy and maintain. The solution structure is shown below: @@ -246,17 +246,17 @@ This project is an application that hosts the API of the solution. It has its ow Just like the default structure, this project contains the User Interface (UI) of the application. It contains razor pages, JavaScript files, style files, images and so on... -This project contains an `appsettings.json` file, but this time it does not have a connection string because it never connects to the database. Instead, it mainly contains endpoint of the remote API server and the authentication server. +This project contains an `appsettings.json` file, but this time it does not have a connection string because it never connects to the database. Instead, it mainly contains the endpoint of the remote API server and the authentication server. #### Pre-requirements -* [Redis](https://redis.io/): The applications use Redis as as distributed cache. So, you need to have Redis installed & running. +* [Redis](https://redis.io/): The applications use Redis as a distributed cache. So, you need to have Redis installed & running. #### How to Run? You should run the application with the given order: -* First, run the `.IdentityServer` since other applications depends on it. +* First, run the `.IdentityServer` since other applications depend on it. * Then run the `.HttpApi.Host` since it is used by the `.Web` application. * Finally, you can run the `.Web` project and login to the application (using `admin` as the username and `1q2w3E*` as the password). @@ -286,9 +286,9 @@ Angular application module structure: #### AppModule -`AppModule` is the root module of the application. Some of ABP modules and some essential modules imported to the `AppModule`. +`AppModule` is the root module of the application. Some of the ABP modules and some essential modules are imported to `AppModule`. -ABP Config modules also have imported to `AppModule`  for initially requirements of lazy-loadable ABP modules. +ABP Config modules have also been imported to `AppModule` for initial requirements of the lazy-loadable ABP modules. #### AppRoutingModule @@ -315,22 +315,22 @@ You should add `routes` property in the `data` object to add a link on the menu ``` In the above example; * If the user is not logged in, AuthGuard blocks access and redirects to the login page. -* PermissionGuard checks the user's permission with `requiredPolicy` property of the `rotues` object. If the user is not authorized to access the page, the 403 page appears. -* `name` property of `routes` is the menu link label. A localization key can be defined . -* `iconClass` property of `routes` object is the menu link icon class. -* `requiredPolicy` property of `routes` object is the required policy key to access the page. +* PermissionGuard checks the user's permission with the `requiredPolicy` property of the `routes` object. If the user is not authorized to access the page, the 403 page appears. +* The `name` property of `routes` is the menu link label. A localization key can be defined. +* The `iconClass` property of the `routes` object is the menu link icon class. +* The `requiredPolicy` property of the `routes` object is the required policy key to access the page. After the above `routes` definition, if the user is authorized, the dashboard link will appear on the menu. #### Shared Module -The modules that may be required for all modules have imported to the `SharedModule`. You should import the `SharedModule` to all modules. +The modules that may be required for all modules have been imported to the `SharedModule`. You should import `SharedModule` to all modules. See the [Sharing Modules](https://angular.io/guide/sharing-ngmodules) document. #### Environments -The files under the `src/environments` folder has the essential configuration of the application. +The files under the `src/environments` folder have the essential configuration of the application. #### Home Module @@ -338,11 +338,11 @@ Home module is an example lazy-loadable module that loads on the root address of #### Styles -The required style files added to `styles` array in the `angular.json`. `AppComponent` loads some style files lazily via `LazyLoadService` after the main bundle is loaded to shorten the first rendering time. +The required style files are added to the `styles` array in `angular.json`. `AppComponent` loads some style files lazily via `LazyLoadService` after the main bundle is loaded to shorten the first rendering time. #### Testing -You should create your tests in the same folder as the file file you want to test. +You should create your tests in the same folder as the file you want to test. See the [testing document](https://angular.io/guide/testing). @@ -356,7 +356,7 @@ See the [testing document](https://angular.io/guide/testing). ### React Native -if `-m react-native` option is spesified in new project command, the solution includes the [React Native](https://reactnative.dev/) application in the `react-native` folder. +If the `-m react-native` option is specified in the new project command, the solution includes the [React Native](https://reactnative.dev/) application in the `react-native` folder. The server-side is similar to the solution described above. `*.HttpApi.Host` project serves the API, so the React Native application consumes it. @@ -366,17 +366,17 @@ React Native application folder structure as like below: ![react-native-folder-structure](../images/react-native-folder-structure.png) -* `App.js` is bootstrap component of the application. -* `Environment.js` file has the essential configuration of the application. `prod` and `dev` configurations defined in this file. +* `App.js` is the bootstrap component of the application. +* `Environment.js` file has the essential configuration of the application. `prod` and `dev` configurations are defined in this file. * [Contexts](https://reactjs.org/docs/context.html) are created in the `src/contexts` folder. -* [Higher order components](https://reactjs.org/docs/higher-order-components.html) are created in the`src/hocs` folder. -* [Custom hooks](https://reactjs.org/docs/hooks-custom.html#extracting-a-custom-hook) are created in the`src/hooks`. +* [Higher order components](https://reactjs.org/docs/higher-order-components.html) are created in the `src/hocs` folder. +* [Custom hooks](https://reactjs.org/docs/hooks-custom.html#extracting-a-custom-hook) are created in `src/hooks`. * [Axios interceptors](https://github.com/axios/axios#interceptors) are created in the `src/interceptors` folder. * Utility functions are exported from `src/utils` folder. #### Components -Components that can be used on all screens are created in the `src/components` folder. All components have created as a function that able to use [hooks](https://reactjs.org/docs/hooks-intro.html). +Components that can be used on all screens are created in the `src/components` folder. All components have been created as a function that is able to use [hooks](https://reactjs.org/docs/hooks-intro.html). #### Screens @@ -388,13 +388,13 @@ Each screen is used in a navigator in the `src/navigators` folder. #### Navigation -[React Navigation](https://reactnavigation.org/) is used as a navigation library. Navigators are created in the `src/navigators`. A [drawer](https://reactnavigation.org/docs/drawer-based-navigation/) navigator and several [stack](https://reactnavigation.org/docs/hello-react-navigation/#installing-the-stack-navigator-library) navigators have created in this folder. See the [above diagram](#screens) for navigation structure. +[React Navigation](https://reactnavigation.org/) is used as a navigation library. Navigators are created in the `src/navigators`. A [drawer](https://reactnavigation.org/docs/drawer-based-navigation/) navigator and several [stack](https://reactnavigation.org/docs/hello-react-navigation/#installing-the-stack-navigator-library) navigators have been created in this folder. See the [above diagram](#screens) for the navigation structure. #### State Management -[Redux](https://redux.js.org/) is used as state management library. [Redux Toolkit](https://redux-toolkit.js.org/) library is used as a toolset for efficient Redux development. +[Redux](https://redux.js.org/) is used as a state management library. [Redux Toolkit](https://redux-toolkit.js.org/) library is used as a toolset for efficient Redux development. -Actions, reducers, sagas, selectors are created in the `src/store` folder. Store folder as like below: +Actions, reducers, sagas and selectors are created in the `src/store` folder. Store folder is as below: ![react-native-store-folder](../images/react-native-store-folder.png) @@ -426,11 +426,11 @@ See the [Testing Overview](https://reactjs.org/docs/testing.html) document. * [Native Base](https://nativebase.io/) is used as UI components library. * [React Navigation](https://reactnavigation.org/) is used as navigation library. -* [Axios](https://github.com/axios/axios) is used as HTTP client library. +* [Axios](https://github.com/axios/axios) is used as an HTTP client library. * [Redux](https://redux.js.org/) is used as state management library. * [Redux Toolkit](https://redux-toolkit.js.org/) library is used as a toolset for efficient Redux development. * [Redux-Saga](https://redux-saga.js.org/) is used to manage asynchronous processes. -* [Redux Persist](https://github.com/rt2zz/redux-persist) is used as state persistance. +* [Redux Persist](https://github.com/rt2zz/redux-persist) is used as state persistence. * [Reselect](https://github.com/reduxjs/reselect) is used to create memoized selectors. * [i18n-js](https://github.com/fnando/i18n-js) is used as i18n library. * [expo-font](https://docs.expo.io/versions/latest/sdk/font/) library allows loading fonts easily. diff --git a/docs/en/Tutorials/Todo/Index.md b/docs/en/Tutorials/Todo/Index.md index 7b232c4873..b3e5a876df 100644 --- a/docs/en/Tutorials/Todo/Index.md +++ b/docs/en/Tutorials/Todo/Index.md @@ -96,13 +96,7 @@ Ensure that the `TodoApp.HttpApi.Host` project is the startup project, then run You can explore and test your HTTP API with this UI. If it works, we can run the Angular client application. -First, run the following command to restore the NPM packages; - -````bash -npm install -```` - -It will take some time to install all the packages. Then you can run the application using the following command: +You can run the application using the following command: ````bash npm start diff --git a/docs/en/UI/AspNetCore/JavaScript-API/GlobalFeatures.md b/docs/en/UI/AspNetCore/JavaScript-API/GlobalFeatures.md new file mode 100644 index 0000000000..7b451addcd --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/GlobalFeatures.md @@ -0,0 +1,24 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Global Features API + +`abp.globalFeatures` API allows you to get the enabled features of the [Global Features](../../../Global-Features.md) in the client side. + +> This document only explains the JavaScript API. See the [Global Features](../../../Global-Features.md) document to understand the ABP Global Features system. + +## Usage + +````js +//Gets all enabled global features. +> abp.globalFeatures.enabledFeatures + +[ 'Shopping.Payment', 'Ecommerce.Subscription' ] + + +//Check the global feature is enabled +> abp.globalFeatures.isEnabled('Ecommerce.Subscription') + +true + +> abp.globalFeatures.isEnabled('My.Subscription') + +false +```` diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Index.md b/docs/en/UI/AspNetCore/JavaScript-API/Index.md index 3473140392..21a3eeed93 100644 --- a/docs/en/UI/AspNetCore/JavaScript-API/Index.md +++ b/docs/en/UI/AspNetCore/JavaScript-API/Index.md @@ -10,6 +10,7 @@ ABP provides a set of JavaScript APIs for ASP.NET Core MVC / Razor Pages applica * [DOM](DOM.md) * [Events](Events.md) * [Features](Features.md) +* [Global Features](GlobalFeatures.md) * [Localization](Localization.md) * [Logging](Logging.md) * [ResourceLoader](ResourceLoader.md) diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index 66910b683d..a5d7fb7d46 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -1320,7 +1320,15 @@ "path": "Samples/Index.md" }, { - "text": "Microservice Demo", + "text": "eShopOnAbp", + "path": "https://github.com/abpframework/eShopOnAbp" + }, + { + "text": "EventHub", + "path": "https://github.com/abpframework/eventhub" + }, + { + "text": "Microservice Demo (legacy)", "path": "Samples/Microservice-Demo.md" } ] diff --git a/docs/zh-Hans/Distributed-Event-Bus.md b/docs/zh-Hans/Distributed-Event-Bus.md index e59fa5e726..8c32e6294b 100644 --- a/docs/zh-Hans/Distributed-Event-Bus.md +++ b/docs/zh-Hans/Distributed-Event-Bus.md @@ -84,7 +84,7 @@ namespace AbpDemo #### 关于序列化的事件对象 -事件传输对象**必须是可序列化**的,因为将其传输到流程外时,它们将被序列化/反序列化为JSON或其他格式. +事件传输对象**必须是可序列化**的,因为将其传输到进程外时,它们将被序列化/反序列化为JSON或其他格式. 避免循环引用,多态,私有setter,并提供默认(空)构造函数,如果你有其他的构造函数.(虽然某些序列化器可能会正常工作),就像DTO一样. diff --git a/docs/zh-Hans/Domain-Services.md b/docs/zh-Hans/Domain-Services.md index a617aea645..0c61dd2330 100644 --- a/docs/zh-Hans/Domain-Services.md +++ b/docs/zh-Hans/Domain-Services.md @@ -116,7 +116,6 @@ namespace MyProject.Issues ## 应用程序服务与领域服务 -虽然应用服务和领域服务都实现了业务规则,但存在根本的逻辑和形式差异; 虽然 [应用服务](Application-Services.md) 和领域服务都实现了业务规则,但存在根本的逻辑和形式差异: * 应用程序服务实现应用程序的 **用例** (典型 Web 应用程序中的用户交互), 而领域服务实现 **核心的、用例独立的领域逻辑**. diff --git a/docs/zh-Hans/Entities.md b/docs/zh-Hans/Entities.md index 7cd96b2820..8fbf16ddd3 100644 --- a/docs/zh-Hans/Entities.md +++ b/docs/zh-Hans/Entities.md @@ -70,7 +70,7 @@ public class BookAppService : ApplicationService, IBookAppService } ```` -* `BookAppService` 注入图书实体的默认[仓库](Repositories.md),使用`InsertAsync`方法插入 `Book` 到数据库中. +* `BookAppService` 注入图书实体的默认[仓储](Repositories.md),使用`InsertAsync`方法插入 `Book` 到数据库中. * `GuidGenerator`类型是 `IGuidGenerator`,它是在`ApplicationService`基类中定义的属性. ABP将这样常用属性预注入,所以不需要手动[注入](Dependency-Injection.md). * 如果你想遵循DDD最佳实践,请参阅下面的*聚合示例*部分. @@ -373,7 +373,7 @@ public static class IdentityUserExtensions * 对于 [Entity Framework Core](Entity-Framework-Core.md),这是两种类型的配置; * 默认它以 `JSON` 字符串形式存储在 `ExtraProperties` 字段中. 序列化到 `JSON` 和反序列化到 `JSON` 由ABP使用EF Core的[值转换](https://docs.microsoft.com/zh-cn/ef/core/modeling/value-conversions)系统自动完成. - * 如果需要,你可以使用 `ObjectExtensionManager` 为所需的额外属性定义一个单独的数据库字段. 那些使用 `ObjectExtensionManager` 配置的属性继续使用单个 `JSON` 字段. 当你使用预构建的[应用模块](Modules/Index.md)并且想要[扩展模块的实体](Customizing-Application-Modules-Extending-Entities.md). 参阅[EF Core迁移文档](Entity-Framework-Core.md)了解如何使用 `ObjectExtensionManager`. + * 如果需要,你可以使用 `ObjectExtensionManager` 为所需的额外属性定义一个单独的数据库字段. 未使用 `ObjectExtensionManager` 配置的属性继续使用单个 `JSON` 字段. 当你使用预构建的[应用模块](Modules/Index.md)并且想要[扩展模块的实体](Customizing-Application-Modules-Extending-Entities.md). 参阅[EF Core迁移文档](Entity-Framework-Core.md)了解如何使用 `ObjectExtensionManager`. * 对于 [MongoDB](MongoDB.md), 它以 **常规字段** 存储, 因为 MongoDB 天生支持这种 [额外](https://mongodb.github.io/mongo-csharp-driver/1.11/serialization/#supporting-extra-elements) 系统. ### 讨论额外的属性 diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationGlobalFeatureConfigurationDto.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationGlobalFeatureConfigurationDto.cs index e911cd911d..9854e85315 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationGlobalFeatureConfigurationDto.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationGlobalFeatureConfigurationDto.cs @@ -8,11 +8,8 @@ public class ApplicationGlobalFeatureConfigurationDto { public HashSet EnabledFeatures { get; set; } - public Dictionary> ModuleEnabledFeatures { get; set; } - public ApplicationGlobalFeatureConfigurationDto() { EnabledFeatures = new HashSet(); - ModuleEnabledFeatures = new Dictionary>(); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/fa.json b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/fa.json new file mode 100644 index 0000000000..83e7d2423d --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/fa.json @@ -0,0 +1,13 @@ +{ + "culture": "fa", + "texts": { + "GivenTenantIsNotExist": "تننت مورد نظر وجود ندارد: {0}", + "GivenTenantIsNotAvailable": "تننت مورد نظر در دسترس نمیباشد: {0}", + "Tenant": "تننت", + "Switch": "جابجایی", + "Name": "نام", + "SwitchTenantHint": "برای جابجایی به سمت میزبان، قسمت نام را خالی بگذارید.", + "SwitchTenant": "جابجایی تننت", + "NotSelected": "انتخاب نشده" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs index bfa2e6a285..b80a288e81 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs @@ -295,15 +295,9 @@ public class AbpApplicationConfigurationAppService : ApplicationService, IAbpApp result.EnabledFeatures.AddIfNotContains(enabledFeatureName); } - foreach (var module in GlobalFeatureManager.Instance.Modules) - { - result.ModuleEnabledFeatures.AddIfNotContains(new KeyValuePair>(module.Key, module.Value.GetFeatures().Select(x => x.FeatureName).ToList())); - } - return Task.FromResult(result); } - protected virtual async Task GetTimingConfigAsync() { var windowsTimeZoneId = await _settingProvider.GetOrNullAsync(TimingSettingNames.TimeZone); diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Localization/fa.json b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Localization/fa.json new file mode 100644 index 0000000000..5e8bf4d484 --- /dev/null +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Localization/fa.json @@ -0,0 +1,10 @@ +{ + "culture": "fa", + "texts": { + "Volo.Authorization:010001": "اعتبار سنجی انجام نشد! دسترسی داده نشده است.", + "Volo.Authorization:010002": "اعتبار سنجی انجام نشد! دسترسی داده نشده است: {PolicyName}", + "Volo.Authorization:010003": "اعتبار سنجی انجام نشد! دسترسی به منابع مورد نظر داده نشده است: {ResourceName}", + "Volo.Authorization:010004": "اعتبار سنجی انجام نشد! به مورد اعلامی دسترسی داده نشده است: {ResourceName}", + "Volo.Authorization:010005": "اعتبار سنجی انجام نشد! به موارد اعلامی دسترسی داده نشده است: {ResourceName}" + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs index 8c8a6cdbd0..5f1698661e 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs @@ -48,7 +48,7 @@ public class AngularServiceProxyGenerator : ServiceProxyGeneratorBase{0}.": "سلام {0}.", + "Car": "اتومبیل", + "CarPlural": "اتومبیل ها", + "MaxLenghtErrorMessage": "طول این فیلد میتواند نهایتا '{0}' کاراکتر باشد", + "Universe": "کائنات", + "FortyTwo": "چهل و دو" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/fa.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/fa.json new file mode 100644 index 0000000000..1ffcb34105 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/fa.json @@ -0,0 +1,6 @@ +{ + "culture": "fa", + "texts": { + "SeeYou": "به امید دیدار" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/fa.json b/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/fa.json new file mode 100644 index 0000000000..2b0cfde0d6 --- /dev/null +++ b/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/fa.json @@ -0,0 +1,7 @@ +{ + "culture": "fa", + "texts": { + "HelloText": "سلام {0}", + "HowAreYou": "حال شما چطور است؟" + } +} diff --git a/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor.cs b/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor.cs index f794b19672..3cb5acfda3 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor.cs +++ b/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor.cs @@ -92,4 +92,6 @@ public class PersonalInfoModel public bool PhoneNumberConfirmed { get; set; } public bool EmailConfirmed { get; set; } + + public string ConcurrencyStamp { get; set; } } diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json index 9948a950e9..208c07a40d 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json @@ -7,4 +7,4 @@ "highlight.js": "^9.13.1" }, "devDependencies": {} -} \ No newline at end of file +} diff --git a/modules/blogging/app/Volo.BloggingTestApp/package.json b/modules/blogging/app/Volo.BloggingTestApp/package.json index d25e7b6f31..19e7db14b3 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/package.json +++ b/modules/blogging/app/Volo.BloggingTestApp/package.json @@ -6,4 +6,4 @@ "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1", "@abp/blogging": "^5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json index 3eeba0cb36..5b234d4e74 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json index 09b98ca204..c5c6513e13 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json b/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json index 0f2145759f..225e05ff7f 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json index 62e3847647..fa12ec7077 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json @@ -6,4 +6,4 @@ "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1", "@abp/cms-kit": "5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs index b948f360d9..089b86cc4f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; using MongoDB.Driver; using MongoDB.Driver.Linq; using Volo.Abp; -using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; using Volo.CmsKit.Comments; @@ -23,25 +22,16 @@ public class MongoCommentRepository : MongoDbRepository GetWithAuthorAsync(Guid id, CancellationToken cancellationToken = default) { - var query = from comment in (await GetMongoQueryableAsync(cancellationToken)) - join user in (await GetDbContextAsync(cancellationToken)).CmsUsers on comment.CreatorId equals user.Id - where id == comment.Id - select new { - Comment = comment, - Author = user - }; - - var commentWithAuthor = await query.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); - - if (commentWithAuthor == null) - { - throw new EntityNotFoundException(typeof(Comment), id); - } + var comment = await GetAsync(id); + var author = await (await GetDbContextAsync()) + .CmsUsers + .AsQueryable() + .FirstOrDefaultAsync(x => x.Id == comment.CreatorId, GetCancellationToken(cancellationToken)); return new CommentWithAuthorQueryResultItem() { - Comment = commentWithAuthor.Comment, - Author = commentWithAuthor.Author + Comment = comment, + Author = author }; } diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs index facf55f523..ea4d2bbc61 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Comments/CommentRepository_Tests.cs @@ -54,6 +54,15 @@ public abstract class CommentRepository_Tests : CmsKitTestBase x.Author == null).ShouldBeFalse(); } + [Fact] + public async Task GetWithAuthorAsync() + { + var commentDetail = await _commentRepository.GetWithAuthorAsync(_cmsKitTestData.CommentWithChildId); + + commentDetail.ShouldNotBeNull(); + commentDetail.Author.ShouldNotBeNull(); + } + [Fact] public async Task DeleteWithRepliesAsync() { diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/ClaimDestinations/AbpDefaultOpenIddictClaimDestinationsProvider.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/ClaimDestinations/AbpDefaultOpenIddictClaimDestinationsProvider.cs index c00339a339..b200dfc4a4 100644 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/ClaimDestinations/AbpDefaultOpenIddictClaimDestinationsProvider.cs +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/ClaimDestinations/AbpDefaultOpenIddictClaimDestinationsProvider.cs @@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; +using Microsoft.IdentityModel.JsonWebTokens; using OpenIddict.Abstractions; using Volo.Abp.DependencyInjection; using Volo.Abp.Security.Claims; @@ -35,6 +36,14 @@ public class AbpDefaultOpenIddictClaimDestinationsProvider : IAbpOpenIddictClaim } break; + case JwtRegisteredClaimNames.UniqueName: + claim.SetDestinations(OpenIddictConstants.Destinations.AccessToken); + if (context.Principal.HasScope(OpenIddictConstants.Scopes.Profile)) + { + claim.SetDestinations(OpenIddictConstants.Destinations.AccessToken, OpenIddictConstants.Destinations.IdentityToken); + } + break; + case OpenIddictConstants.Claims.Email: claim.SetDestinations(OpenIddictConstants.Destinations.AccessToken); if (context.Principal.HasScope(OpenIddictConstants.Scopes.Email)) diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/OpenIddictClaimsPrincipalContributor.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/OpenIddictClaimsPrincipalContributor.cs new file mode 100644 index 0000000000..9a4c027f97 --- /dev/null +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/OpenIddictClaimsPrincipalContributor.cs @@ -0,0 +1,35 @@ +using System.Linq; +using System.Security.Claims; +using System.Security.Principal; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Identity; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using Microsoft.IdentityModel.JsonWebTokens; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Security.Claims; + +namespace Volo.Abp.OpenIddict; + +/// +/// https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/1627 +/// https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/05e02b5e0383be40e45c667c12f6667d38e33fcc/src/System.IdentityModel.Tokens.Jwt/ClaimTypeMapping.cs#L52 +/// +public class OpenIddictClaimsPrincipalContributor : IAbpClaimsPrincipalContributor, ITransientDependency +{ + public Task ContributeAsync(AbpClaimsPrincipalContributorContext context) + { + var identity = context.ClaimsPrincipal.Identities.FirstOrDefault(); + if (identity != null) + { + var options = context.ServiceProvider.GetRequiredService>().Value; + var usernameClaim = identity.FindFirst(options.ClaimsIdentity.UserNameClaimType); + if (usernameClaim != null) + { + identity.AddIfNotContains(new Claim(JwtRegisteredClaimNames.UniqueName, usernameClaim.Value)); + } + } + + return Task.CompletedTask; + } +} diff --git a/npm/packs/core/src/abp.js b/npm/packs/core/src/abp.js index 7cb0782f1a..b028c013d6 100644 --- a/npm/packs/core/src/abp.js +++ b/npm/packs/core/src/abp.js @@ -773,4 +773,14 @@ var abp = abp || {}; return abp.features.values[name]; }; + /* GLOBAL FEATURES *************************************************/ + + abp.globalFeatures = abp.globalFeatures || {}; + + abp.globalFeatures.enabledFeatures = abp.globalFeatures.enabledFeatures || []; + + abp.globalFeatures.isEnabled = function(name){ + return abp.globalFeatures.enabledFeatures.indexOf(name) != -1; + } + })(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json index 0f2145759f..225e05ff7f 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json index 0f2145759f..225e05ff7f 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json index 7c51cc96bc..c698e3e4a3 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "~5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json index 7c51cc96bc..c698e3e4a3 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "~5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/templates/app/angular/package.json b/templates/app/angular/package.json index 2cc214007f..cd84b165a9 100644 --- a/templates/app/angular/package.json +++ b/templates/app/angular/package.json @@ -58,4 +58,4 @@ "ng-packagr": "^13.1.2", "typescript": "~4.5.4" } -} \ No newline at end of file +} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json index 0f2145759f..225e05ff7f 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json index 09b98ca204..c5c6513e13 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json index 0f2145759f..225e05ff7f 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json index 0f2145759f..225e05ff7f 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/templates/module/angular/package.json b/templates/module/angular/package.json index 238087df41..e11cdc85d5 100644 --- a/templates/module/angular/package.json +++ b/templates/module/angular/package.json @@ -62,4 +62,4 @@ "symlink-manager": "^1.5.0", "typescript": "~4.5.4" } -} \ No newline at end of file +} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json index 09b98ca204..c5c6513e13 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json index 0f2145759f..225e05ff7f 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1" } -} \ No newline at end of file +} diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json index 0f2145759f..225e05ff7f 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json @@ -5,4 +5,4 @@ "dependencies": { "@abp/aspnetcore.mvc.ui.theme.basic": "^5.3.0-rc.1" } -} \ No newline at end of file +}