mirror of https://github.com/abpframework/abp
				
				
				
			
						commit
						1ab67a255c
					
				| @ -0,0 +1,30 @@ | ||||
| # ABP dokumentace | ||||
| 
 | ||||
| ABP je **open source aplikační framework** se zaměřením na vývoj webových aplikací založených na ASP.NET Core, zároveň ho však lze využít i k vývoji jiných typů aplikací. | ||||
| 
 | ||||
| K procházení dokumentace využijte navigační nabídky vlevo. | ||||
| 
 | ||||
| ## Stav projektu | ||||
| 
 | ||||
| ABP je **novou generací** open source frameworku [ASP.NET Boilerplate](https://aspnetboilerplate.com/). V současné době je v ranné fázi a není připraven k ostrému nasazení. Na dokumentaci se stále pracuje a ještě zdaleka není dokončena. | ||||
| 
 | ||||
| Pro aplikace na krátkodobé a ostré nasazení je doporučeno použít [ASP.NET Boilerplate](https://aspnetboilerplate.com/) framework, který je bohatý na funkce, vyspělý, aktivně udržovaný a aktuální. | ||||
| 
 | ||||
| ## Začínáme | ||||
| 
 | ||||
| Nejsnazší cestou jak začít nový projekt s ABP je užití startovací šablony: | ||||
| 
 | ||||
| * [ASP.NET Core MVC Šablona](Getting-Started-AspNetCore-MVC-Template.md) | ||||
| 
 | ||||
| Pokud chcete začít od nuly (s prázdným projektem) tak manuálně nainstalujte ABP Framework s pomocí následujících tutoriálů: | ||||
| 
 | ||||
| * [Konzolová Aplikace](Getting-Started-Console-Application.md) | ||||
| * [ASP.NET Core Web Aplikace](Getting-Started-AspNetCore-Application.md) | ||||
| 
 | ||||
| ## Zdrojový kód | ||||
| 
 | ||||
| ABP je hostovaný na GitHub. Zobrazit [zdrojový kód](https://github.com/abpframework/abp). | ||||
| 
 | ||||
| ## Chcete přispět? | ||||
| 
 | ||||
| ABP je komunitně řízený open source projekt. Podívejte se na [průvodce pro přispěvatele](Contribution/Index.md) pokud chcete být součástí tohoto projektu. | ||||
| @ -0,0 +1,292 @@ | ||||
| { | ||||
|   "items": [ | ||||
|     { | ||||
|       "text": "Začínáme", | ||||
|       "items": [ | ||||
|         { | ||||
|           "text": "Ze startovacích šablon", | ||||
|           "items": [ | ||||
|             { | ||||
|               "text": "ASP.NET Core MVC", | ||||
|               "path": "Getting-Started-AspNetCore-MVC-Template.md" | ||||
|             } | ||||
|           ] | ||||
|         }, | ||||
|         { | ||||
|           "text": "Z prázdných projektů", | ||||
|           "items": [ | ||||
|             { | ||||
|               "text": "S ASP.NET Core Web aplikací", | ||||
|               "path": "Getting-Started-AspNetCore-Application.md" | ||||
|             }, | ||||
|             { | ||||
|               "text": "S konzolovou aplikací", | ||||
|               "path": "Getting-Started-Console-Application.md" | ||||
|             } | ||||
|           ] | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "text": "Tutoriály", | ||||
|       "items": [ | ||||
|         { | ||||
|           "text": "Vývoj aplikace", | ||||
|           "items": [ | ||||
|             { | ||||
|               "text": "S ASP.NET Core MVC", | ||||
|               "path": "Tutorials/AspNetCore-Mvc/Part-I.md" | ||||
|             } | ||||
|           ] | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "text": "CLI", | ||||
|       "path": "CLI.md" | ||||
|     }, | ||||
|     { | ||||
|       "text": "Základy", | ||||
|       "items": [ | ||||
|         { | ||||
|           "text": "Vkládání závislostí", | ||||
|           "path": "Dependency-Injection.md", | ||||
|           "items": [ | ||||
|             { | ||||
|               "text": "AutoFac integrace", | ||||
|               "path": "Autofac-Integration.md" | ||||
|             } | ||||
|           ] | ||||
|         }, | ||||
|         { | ||||
|           "text": "Virtuální systém souborů", | ||||
|           "path": "Virtual-File-System.md" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Lokalizace", | ||||
|           "path": "Localization.md" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Zpracování výjimek", | ||||
|           "path": "Exception-Handling.md" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Validace" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Autorizace" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Ukládání do mezipaměti" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Audit" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Správa nastavení" | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "text": "Události", | ||||
|       "items": [ | ||||
|         { | ||||
|           "text": "Event bus (místní)" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Distribuovaný event bus", | ||||
|           "items": [ | ||||
|             { | ||||
|               "text": "RabbitMQ integrace" | ||||
|             } | ||||
|           ] | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "text": "Služby", | ||||
|       "items": [ | ||||
|         { | ||||
|           "text": "Serializace objektu" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Serializace JSON" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Emailování" | ||||
|         }, | ||||
|         { | ||||
|           "text": "GUIDy" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Vláknování" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Časování" | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "text": "Multitenance", | ||||
|       "path": "Multi-Tenancy.md" | ||||
|     }, | ||||
|     { | ||||
|       "text": "Vývoj modulů", | ||||
|       "items": [ | ||||
|         { | ||||
|           "text": "Základy", | ||||
|           "path": "Module-Development-Basics.md" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Zásuvné moduly" | ||||
|         }, | ||||
|         { | ||||
|           "text": "Nejlepší praktiky", | ||||
|           "path": "Best-Practices/Index.md" | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "text": "Domain driven design", | ||||
|       "path": "Domain-Driven-Design.md", | ||||
|       "items": [ | ||||
|         { | ||||
|           "text": "Doménová vrstva", | ||||
|           "items": [ | ||||
|             { | ||||
|               "text": "Entity & agregované kořeny", | ||||
|               "path": "Entities.md" | ||||
|             }, | ||||
|             { | ||||
|               "text": "Hodnotové objekty" | ||||
|             }, | ||||
|             { | ||||
|               "text": "Repozitáře", | ||||
|               "path": "Repositories.md" | ||||
|             }, | ||||
|             { | ||||
|               "text": "Doménové služby" | ||||
|             }, | ||||
|             { | ||||
|               "text": "Specifikace" | ||||
|             } | ||||
|           ] | ||||
|         }, | ||||
|         { | ||||
|           "text": "Aplikační vrstva", | ||||
|           "items": [ | ||||
|             { | ||||
|               "text": "Aplikační služby", | ||||
|               "path": "Application-Services.md" | ||||
|             }, | ||||
|             { | ||||
|               "text": "Objekty přenosu dat" | ||||
|             }, | ||||
|             { | ||||
|               "text": "Jednotka práce" | ||||
|             } | ||||
|           ] | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "text": "ASP.NET Core", | ||||
|       "items": [ | ||||
|         { | ||||
|           "text": "API", | ||||
|           "items": [             | ||||
|             { | ||||
|               "text": "Automatické API řadiče", | ||||
|               "path": "AspNetCore/Auto-API-Controllers.md" | ||||
|             }, | ||||
|             { | ||||
|               "text": "Dynamičtí C# API klienti", | ||||
|               "path": "AspNetCore/Dynamic-CSharp-API-Clients.md" | ||||
|             } | ||||
|           ] | ||||
|         }, | ||||
|         { | ||||
|           "text": "Uživatelské rozhraní", | ||||
|           "items": [ | ||||
|             { | ||||
|               "text": "Správa klientských balíčků", | ||||
|               "path": "AspNetCore/Client-Side-Package-Management.md" | ||||
|             }, | ||||
|             { | ||||
|               "text": "Svazování & minifikace", | ||||
|               "path": "AspNetCore/Bundling-Minification.md" | ||||
|             }, | ||||
|             { | ||||
|               "text": "Tag pomocníci", | ||||
|               "path": "Tag-Helpers.md" | ||||
|             }, | ||||
|             { | ||||
|               "text": "Motivy", | ||||
|               "path": "AspNetCore/Theming.md" | ||||
|             } | ||||
|           ] | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "text": "Přístup k datům", | ||||
|       "items": [ | ||||
|         { | ||||
|           "text": "Entity Framework Core integrace", | ||||
|           "path": "Entity-Framework-Core.md" | ||||
|         }, | ||||
|         { | ||||
|           "text": "MongoDB integrace", | ||||
|           "path": "MongoDB.md" | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "text": "Pozadí", | ||||
|       "items": [ | ||||
|         { | ||||
|           "text": "Úkony na pozadí", | ||||
|           "path": "Background-Jobs.md", | ||||
|           "items": [ | ||||
|             { | ||||
|               "text": "Hangfire integrace", | ||||
|               "path": "Background-Jobs-Hangfire.md" | ||||
|             }, | ||||
|             { | ||||
|               "text": "RabbitMQ integrace", | ||||
|               "path": "Background-Jobs-RabbitMq.md" | ||||
|             } | ||||
|           ] | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "text": "Vzorky", | ||||
|       "items": [ | ||||
|         { | ||||
|           "text": "Mikroslužby demo", | ||||
|           "path": "Samples/Microservice-Demo.md" | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     { | ||||
|       "text": "Moduly aplikace", | ||||
|       "path": "Modules/Index.md" | ||||
|     }, | ||||
|     { | ||||
|       "text": "Architektura mikroslužby", | ||||
|       "path": "Microservice-Architecture.md" | ||||
|     }, | ||||
|     { | ||||
|       "text": "Testování" | ||||
|     }, | ||||
|     { | ||||
|       "text": "Noční sestavení", | ||||
|       "path": "Nightly-Builds.md" | ||||
|     }, | ||||
|     { | ||||
|       "text": "Průvodce pro přispěvatele", | ||||
|       "path": "Contribution/Index.md" | ||||
|     } | ||||
|   ] | ||||
| } | ||||
| @ -0,0 +1,3 @@ | ||||
| ## Dynamic JavaScript API Clients | ||||
| 
 | ||||
| TODO | ||||
| @ -1,6 +1,160 @@ | ||||
| # MVC Module Startup Template | ||||
| 
 | ||||
| TODO | ||||
| This template can be used to create a **reusable [application module](../Modules/Index.md)** based on the [module development best practices & conventions](../Best-Practices/Index.md). It is also suitable for creating **microservices** (with or without UI). | ||||
| 
 | ||||
| ## How to Start With? | ||||
| 
 | ||||
| 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: | ||||
| 
 | ||||
| ```bash | ||||
| dotnet tool install -g Volo.Abp.Cli | ||||
| ``` | ||||
| 
 | ||||
| Then use the `abp new` command in an empty folder to create a new solution: | ||||
| 
 | ||||
| ```bash | ||||
| abp new Acme.IssueManagement -t mvc-module | ||||
| ``` | ||||
| 
 | ||||
| - `Acme.IssueManagement` is the solution name, like *YourCompany.YourProduct*. You can use single level, two-levels or three-levels naming. | ||||
| 
 | ||||
| ### Without User Interface | ||||
| 
 | ||||
| The template comes with a UI by default. You can use `--no-ui` option to not include the UI layer. | ||||
| 
 | ||||
| ````bash | ||||
| abp new Acme.IssueManagement -t mvc-module --no-ui | ||||
| ```` | ||||
| 
 | ||||
| ## Solution Structure | ||||
| 
 | ||||
| Based on the options you've specified, you will get a slightly different solution structure. If you don't specify any option, you will have a solution like shown below: | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| Projects are organized as `src`, `test` and `host` folders: | ||||
| 
 | ||||
| * `src` folder contains the actual module which is layered based on [DDD](../Domain-Driven-Design.md) principles. | ||||
| * `test` folder contains unit & integration tests. | ||||
| * `host` folder contains applications with different configurations to demonstrate how to host the module in an application. These are not a part of the module, but useful on development. | ||||
| 
 | ||||
| The diagram below shows the layers & project dependencies of the module: | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| Each section below will explain the related project & its dependencies. | ||||
| 
 | ||||
| ### .Domain.Shared Project | ||||
| 
 | ||||
| This project contains constants, enums and other objects these are actually a part of the domain layer, but needed to be used by all layers/projects in the solution. | ||||
| 
 | ||||
| An `IssueType` enum and an `IssueConts` class (which may have some constant fields for the `Issue` entity, like `MaxTitleLength`) 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. | ||||
| 
 | ||||
| ### .Domain Project | ||||
| 
 | ||||
| This is the domain layer of the solution. It mainly contains [entities, aggregate roots](../Entities.md), [domain services](../Domain-Services.md), [value types](../Value-Types.md), [repository interfaces](../Repositories.md) and other domain objects. | ||||
| 
 | ||||
| An `Issue` entity, an `IssueManager` domain service and an `IIssueRepository` interface are good candidates for this project. | ||||
| 
 | ||||
| - Depends on the `.Domain.Shared` because it uses constants, enums and other objects defined in that project. | ||||
| 
 | ||||
| ### .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. | ||||
| 
 | ||||
| An `IIssueAppService` interface and an `IssueCreationDto` class are good candidates for this project. | ||||
| 
 | ||||
| - Depends on the `.Domain.Shared` because it may use constants, enums and other shared objects of this project in the application service interfaces and DTOs. | ||||
| 
 | ||||
| ### .Application Project | ||||
| 
 | ||||
| This project contains the [application service](../Application-Services.md) **implementations** of the interfaces defined in the `.Application.Contracts` project. | ||||
| 
 | ||||
| An `IssueAppService` class is a good candidate for this project. | ||||
| 
 | ||||
| - Depends on the `.Application.Contracts` project to be able to implement the interfaces and use the DTOs. | ||||
| - Depends on the `.Domain` project to be able to use domain objects (entities, repository interfaces... etc.) to perform the application logic. | ||||
| 
 | ||||
| ### .EntityFrameworkCore Project | ||||
| 
 | ||||
| This is the integration project for EF Core. It defines the `DbContext` and implements repository interfaces defined in the `.Domain` project. | ||||
| 
 | ||||
| - Depends on the `.Domain` project to be able to reference to entities and repository interfaces. | ||||
| 
 | ||||
| > You can delete this project if you don't want to support EF Core for your module. | ||||
| 
 | ||||
| ### .MongoDB Project | ||||
| 
 | ||||
| This is the integration project for MongoDB. | ||||
| 
 | ||||
| - Depends on the `.Domain` project to be able to reference to entities and repository interfaces. | ||||
| 
 | ||||
| > You can delete this project if you don't want to support MongoDB for your module. | ||||
| 
 | ||||
| ### Test Projects | ||||
| 
 | ||||
| The solution has multiple test projects, one for each layer: | ||||
| 
 | ||||
| - `.Domain.Tests` is used to test the domain layer. | ||||
| - `.Application.Tests` is used to test the application layer. | ||||
| - `.EntityFrameworkCore.Tests` is used to test EF Core configuration and custom repositories. | ||||
| - `.MongoDB.Tests` is used to test EF Core configuration and custom repositories. | ||||
| - `.TestBase` is a base (shared) project for all tests. | ||||
| 
 | ||||
| In addition, `.HttpApi.Client.ConsoleTestApp` is a console application (not an automated test project) which demonstrate the usage of HTTP APIs from a Dotnet application. | ||||
| 
 | ||||
| Test projects are prepared for integration testing; | ||||
| 
 | ||||
| - It is fully integrated to 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). | ||||
| 
 | ||||
| > Domain & Application tests are using EF Core. If you remove EF Core integration or you want to use MongoDB for testing these layers, you should manually change project references & module dependencies. | ||||
| 
 | ||||
| ### Host Projects | ||||
| 
 | ||||
| The solution has a few host applications to run your module on development. Host applications are used to run your module in a fully configured application. It is useful on development. Host applications includes some other modules in addition to the module being developed: | ||||
| 
 | ||||
| *  | ||||
| 
 | ||||
| Host applications support two types of scenarios. | ||||
| 
 | ||||
| #### Single (Unified) Application Scenario | ||||
| 
 | ||||
| If your module has a UI, then `.Web.Unified` application is used to host the UI and API on a single point. It has its own `appsettings.json` file (that includes the database connection string) and EF Core database migrations. | ||||
| 
 | ||||
| For the `.Web.Unified` application, there is a single database, named `YourProjectName_Unified` (like *IssueManagement_Unified* for this sample). | ||||
| 
 | ||||
| > If you've selected the `--no-ui` option, this project will not be in your solution. | ||||
| 
 | ||||
| ##### How to Run? | ||||
| 
 | ||||
| Set it as the startup project, run `Update-Database` command for the EF Core from Package Manager Console and run your application. Default username is `admin` and password is `1q2w3E*`. | ||||
| 
 | ||||
| #### Separated Deployment & Databases Scenario | ||||
| 
 | ||||
| In this scenario, there are three applications; | ||||
| 
 | ||||
| * `.IdentityServer` application is an authentication server used by other applications. It has its own `appsettings.json` that contains database connection and other configurations. | ||||
| * `.HttpApi.Host` hosts the HTTP API of the module. It has its own `appsettings.json` that contains database connections and other configurations. | ||||
| * `.Web.Host` host the UI of the module. This project contains an `appsettings.json` file, but 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. | ||||
| 
 | ||||
| The diagram below shows the relation of the applications: | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| `.Web.Host` project uses OpenId Connect Authentication to get identity and access tokens for the current user from the `.IdentityServer`. Then uses the access token to call the `.HttpApi.Host`. HTTP API server uses bearer token authentication to obtain claims from the access token to authorize the current user. | ||||
| 
 | ||||
| ##### How to Run? | ||||
| 
 | ||||
| You should run the application with the given order: | ||||
| 
 | ||||
| - First, run the `.IdentityServer` since other applications depends on it. | ||||
| - Then run the `.HttpApi.Host` since it is used by the `.Web.Host` application. | ||||
| - Finally, you can run the `.Web.Host` project and login to the application using `admin` as the username and `1q2w3E*` as the password. | ||||
| @ -0,0 +1,3 @@ | ||||
| ## Value Objects | ||||
| 
 | ||||
| TODO | ||||
| @ -1,3 +0,0 @@ | ||||
| ## Value Types | ||||
| 
 | ||||
| TODO | ||||
| Before Width: | Height: | Size: 24 KiB | 
| After Width: | Height: | Size: 25 KiB | 
| After Width: | Height: | Size: 38 KiB | 
| @ -0,0 +1,3 @@ | ||||
| ## Dynamic JavaScript API Clients | ||||
| 
 | ||||
|  TODO | ||||
| @ -0,0 +1,3 @@ | ||||
| ## Value Objects | ||||
| 
 | ||||
|  TODO | ||||
| @ -1,3 +0,0 @@ | ||||
| ## Value Types | ||||
| 
 | ||||
| TODO | ||||
| Before Width: | Height: | Size: 24 KiB | 
| @ -0,0 +1,11 @@ | ||||
| { | ||||
|   "culture": "vi", | ||||
|   "texts": { | ||||
|     "GivenTenantIsNotAvailable": "Người thuê không có sẵn: {0}", | ||||
|     "Tenant": "Người thuê", | ||||
|     "Switch": "Chuyển đổi", | ||||
|     "Name": "Tên", | ||||
|     "SwitchTenantHint": "Để trống trường tên để chuyển sang phía máy chủ.", | ||||
|     "NotSelected": "Không được chọn" | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,171 @@ | ||||
| # Volo.Abp.Ldap | ||||
| 
 | ||||
| # Only Authenticate(not read/write AD) | ||||
| 
 | ||||
| ## Configure | ||||
| 
 | ||||
| add section in `appsettings.json` | ||||
| 
 | ||||
| ### use SSL | ||||
| 
 | ||||
| ```json | ||||
| "LDAP": { | ||||
|     "ServerHost": "192.168.101.54",  | ||||
|     "ServerPort": 636, | ||||
|     "UseSsl": true | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| ### not use SSL | ||||
| 
 | ||||
| ```json | ||||
| "LDAP": { | ||||
|     "ServerHost": "192.168.101.54",  | ||||
|     "ServerPort": 389, | ||||
|     "UseSsl": false | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| ## Authenticate | ||||
| 
 | ||||
|  Injecting `ILdapManager` into a class. For example: | ||||
| 
 | ||||
| ```csharp | ||||
| public class TaxAppService : ApplicationService | ||||
| { | ||||
|     private readonly ILdapManager _ldapManager; | ||||
| 
 | ||||
|     public TaxAppService(ILdapManager ldapManager) | ||||
|     { | ||||
|         _ldapManager = ldapManager; | ||||
|     } | ||||
| 
 | ||||
|     public void Authenticate(string userName, string password) | ||||
|     {  | ||||
|         var result = _ldapManager.Authenticate(userName, password); | ||||
|     } | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| - `userName` must be full domain name. E.g abc@abc.com  | ||||
| 
 | ||||
| # Read/Write AD | ||||
| 
 | ||||
| ## Configure | ||||
| 
 | ||||
| ### use SSL | ||||
| 
 | ||||
| ```json | ||||
| "LDAP": { | ||||
|     "ServerHost": "192.168.101.54", | ||||
|     "ServerPort": 636, | ||||
|     "UseSsl": true, | ||||
|     "Credentials": { | ||||
|         "DomainUserName": "administrator@yourdomain.com.cn", | ||||
|         "Password": "yH.20190528" | ||||
|     }, | ||||
|     "SearchBase": "DC=yourdomain,DC=com,DC=cn", | ||||
|     "DomainName": "yourdomain.com.cn", | ||||
|     "DomainDistinguishedName": "DC=yourdomain,DC=com,DC=cn" | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| ### not use SSL | ||||
| 
 | ||||
| ```json | ||||
| "LDAP": { | ||||
|     "ServerHost": "192.168.101.54", | ||||
|     "ServerPort": 389, | ||||
|     "UseSsl": false, | ||||
|     "Credentials": { | ||||
|         "DomainUserName": "administrator@yourdomain.com.cn", | ||||
|         "Password": "yH.20190528" | ||||
|     }, | ||||
|     "SearchBase": "DC=yourdomain,DC=com,DC=cn", | ||||
|     "DomainName": "yourdomain.com.cn", | ||||
|     "DomainDistinguishedName": "DC=yourdomain,DC=com,DC=cn" | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| - `Credentials:DomainUserName` a administrator of AD. | ||||
| 
 | ||||
| - `Credentials:Password` the password for the administrator. | ||||
| - `SearchBase`:  where search from AD. | ||||
| - `DomainName`: name of you domain. no need `www`. | ||||
| - `DomainDistinguishedName`: distinguished name of root domain. | ||||
| 
 | ||||
| ## Query Organizations | ||||
| 
 | ||||
| ```cs | ||||
| // query all organizations | ||||
| // filter: (&(objectClass=organizationalUnit))  | ||||
| _ldapManager.GetOrganizations(); | ||||
| 
 | ||||
| // query organizations by name | ||||
| // filter: (&(name=abc)(objectClass=organizationalUnit)) | ||||
| _ldapManager.GetOrganizations("abc"); | ||||
| 
 | ||||
| ``` | ||||
| 
 | ||||
| ## Query Organization | ||||
| 
 | ||||
| ```csharp | ||||
| // query organization by distinguished name | ||||
| // filter: (&(distinguishedName=abc)(objectClass=organizationalUnit)) | ||||
| _ldapManager.GetOrganization("abc"); | ||||
| 
 | ||||
| ``` | ||||
| 
 | ||||
| ## Add Organization | ||||
| 
 | ||||
| ```csharp | ||||
| // use LdapOrganization | ||||
| _ldapManager.AddSubOrganization("nameA", parentOrganization); | ||||
| 
 | ||||
| // or use OrganizationDistinguishedName | ||||
| _ldapManager.AddSubOrganization("nameA", "OU=Domain Controllers,DC=yourdomain,DC=com,DC=cn"); | ||||
| ``` | ||||
| 
 | ||||
| ## Query Users | ||||
| 
 | ||||
| ```cs | ||||
| // query all users | ||||
| // filter: (&(objectCategory=person)(objectClass=user)) | ||||
| _ldapManager.GetUsers(); | ||||
| 
 | ||||
| // query organizations by name | ||||
| // filter: (&(name=abc)(objectCategory=person)(objectClass=user)) | ||||
| _ldapManager.GetUsers(name : "abc"); | ||||
| 
 | ||||
| // query organizations by displayName | ||||
| // filter: (&(displayName=abc)(objectCategory=person)(objectClass=user)) | ||||
| _ldapManager.GetUsers(displayName : "abc"); | ||||
| 
 | ||||
| // query organization by commonName | ||||
| // filter: (&(cn=abc)(objectCategory=person)(objectClass=user)) | ||||
| _ldapManager.GetUsers(commonName : "abc"); | ||||
| 
 | ||||
| ``` | ||||
| 
 | ||||
| ## Query User | ||||
| 
 | ||||
| ```csharp | ||||
| // query a user by distinguished name | ||||
| // filter: (&(distinguishedName=abc)(objectCategory=person)(objectClass=user)) | ||||
| _ldapManager.GetUser("abc"); | ||||
| 
 | ||||
| ``` | ||||
| 
 | ||||
| ## Add User | ||||
| 
 | ||||
| ```csharp | ||||
| // use LdapOrganization | ||||
| _ldapManager.AddUserToOrganization("nameA", "passwordA", parentOrganization); | ||||
| 
 | ||||
| // or use OrganizationDistinguishedName | ||||
| _ldapManager.AddUserToOrganization("nameA", "passwordA", "OU=Domain Controllers,DC=yourdomain,DC=com,DC=cn"); | ||||
| ``` | ||||
| 
 | ||||
| # More | ||||
| 
 | ||||
| See [unit test](../../test/Volo.Abp.Ldap.Tests) | ||||
| @ -0,0 +1,20 @@ | ||||
| { | ||||
|   "culture": "pl", | ||||
|   "texts": { | ||||
|     "'{0}' and '{1}' do not match.": "'{0}' i '{1}' nie są takie same.", | ||||
|     "The {0} field is not a valid credit card number.": "Pole {0} nie jest poprawnym numerem karty kredytowej.", | ||||
|     "{0} is not valid.": "{0} jest niepoprawne.", | ||||
|     "The {0} field is not a valid e-mail address.": "Pole {0} nie jest poprawnym adresem e-mail.", | ||||
|     "The {0} field only accepts files with the following extensions: {1}": "Polr {0} przyjmuje pliki tylko z następującymi rozszerzeniami: {1}", | ||||
|     "The field {0} must be a string or array type with a maximum length of '{1}'.": "Pole {0} musi być łańcuchem znaków lub talicą o maksymalnej długości '{1}'.", | ||||
|     "The field {0} must be a string or array type with a minimum length of '{1}'.": "Pole {0} musi być łańcuchem znaków lub talicą o minimalnej długości '{1}'.", | ||||
|     "The {0} field is not a valid phone number.": "Pole {0} nie jest poprawnym numerem telefonu.", | ||||
|     "The field {0} must be between {1} and {2}.": "Pole {0} musi być pomiędzy {1} i {2}.", | ||||
|     "The field {0} must match the regular expression '{1}'.": "Pole {0} musi pasować do wyrażenia regularnego '{1}'.", | ||||
|     "The {0} field is required.": "Pole {0} jest wymagane.", | ||||
|     "The field {0} must be a string with a maximum length of {1}.": "Pole {0} musi być łańcuchem znaków o maksymalnej długości {1}.", | ||||
|     "The field {0} must be a string with a minimum length of {2} and a maximum length of {1}.": "Pole {0} musi być łańcuchem znaków o minimalnej długości {2} i maksymalnej długości {1}.", | ||||
|     "The {0} field is not a valid fully-qualified http, https, or ftp URL.": "Pole {0} nie jest prawidłowym, w pełni kwalifikowanym adresem URL http, https lub ftp.", | ||||
|     "The field {0} is invalid.": "Pole {0} jest niepoprawne." | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,19 @@ | ||||
| { | ||||
|   "culture": "vi", | ||||
|   "texts": { | ||||
|     "'{0}' and '{1}' do not match.": "'{0}' và '{1}' không khớp.", | ||||
|     "The {0} field is not a valid credit card number.": "Trường {0} không phải là một số thẻ tín dụng hợp lệ.", | ||||
|     "{0} is not valid.": "{0} không hợp lệ.", | ||||
|     "The {0} field is not a valid e-mail address.": "Trường {0} không phải là một địa chỉ email hợp lệ.", | ||||
|     "The {0} field only accepts files with the following extensions: {1}": "Trường {0} chỉ chấp nhận các tập tin có phần mở rộng như sau: {1}", | ||||
|     "The field {0} must be a string or array type with a maximum length of '{1}'.": "Trường {0} phải là một chuỗi hoặc một mảng với độ dài tối đa là '{1}'.", | ||||
|     "The {0} field is not a valid phone number.": "Trường {0} không phải là một số điện thoại hợp lệ", | ||||
|     "The field {0} must be between {1} and {2}.": "Trường {0} phải ở giữa {1} and {2}.", | ||||
|     "The field {0} must match the regular expression '{1}'.": "Trường {0} phải khớp với biểu thức chính quy '{1}'.", | ||||
|     "The {0} field is required.": "Trường {0} là bắt buộc.", | ||||
|     "The field {0} must be a string with a maximum length of {1}.": "Trường {0} phải là một chuỗi với độ dài tối đa là {1}.", | ||||
|     "The field {0} must be a string with a minimum length of {2} and a maximum length of {1}.": "Trường {0} phải là một chuỗi với độ dài tối thiểu {2} và tối đa là {1}.", | ||||
|     "The {0} field is not a valid fully-qualified http, https, or ftp URL.": "Trường {0} không phải là một http, https, hoặc ftp URL đủ điều kiện hợp lệ.", | ||||
|     "The field {0} is invalid.": "Trường {0} không có hiệu lực" | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,6 @@ | ||||
| { | ||||
|   "culture": "pl", | ||||
|   "texts": { | ||||
|     "Menu:Administration": "Administracja" | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,6 @@ | ||||
| { | ||||
|   "culture": "vi", | ||||
|   "texts": { | ||||
|     "Menu:Administration": "Quản trị" | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,51 @@ | ||||
| { | ||||
|   "culture": "pl", | ||||
|   "texts": { | ||||
|     "InternalServerErrorMessage": "Błąd wewnętrzny serwera podczas przetwarzania żądania!", | ||||
|     "ValidationErrorMessage": "Twoje żądanie jest niepoprawnie!", | ||||
|     "ValidationNarrativeErrorMessageTitle": "Wykryto następujące błędy podczas walidacji.", | ||||
|     "DefaultErrorMessage": "Wystąpił błąd!", | ||||
|     "DefaultErrorMessageDetail": "Treść błędu nie została wysłana z serwera.", | ||||
|     "DefaultErrorMessage401": "Nie jesteś zalogowany!", | ||||
|     "DefaultErrorMessage401Detail": "Musisz się zalogować, aby wykonać tą operację.", | ||||
|     "DefaultErrorMessage403": "Nie jesteś zautentykowany!", | ||||
|     "DefaultErrorMessage403Detail": "Nie masz uprawnień do wykonania tej operacji!", | ||||
|     "DefaultErrorMessage404": "Nie znaleziono zasobu!", | ||||
|     "DefaultErrorMessage404Detail": "Nie znaleziono zasobu z żądania na serwerze!", | ||||
|     "EntityNotFoundErrorMessage": "Nie istnieje encja {0} z id = {1}!", | ||||
|     "Error": "Błąd", | ||||
|     "AreYouSure": "Czy jesteś pewien?", | ||||
|     "Cancel": "Anuluj", | ||||
|     "Yes": "Tak", | ||||
|     "No": "Nie", | ||||
|     "Close": "Zamknij", | ||||
|     "Save": "Zapisz", | ||||
|     "SavingWithThreeDot": "Zapisywanie...", | ||||
|     "Actions": "Akcje", | ||||
|     "Delete": "Usuń", | ||||
|     "Edit": "Edytuj", | ||||
|     "Refresh": "Odśwież", | ||||
|     "ProcessingWithThreeDot": "Procesowanie...", | ||||
|     "LoadingWithThreeDot": "Ładowanie...", | ||||
|     "Welcome": "Witaj", | ||||
|     "Login": "Zaloguj", | ||||
|     "Register": "Zarejestruj", | ||||
|     "Logout": "Wyloguj", | ||||
|     "Submit": "Wyślij", | ||||
|     "Back": "Cofnij", | ||||
|     "PagerSearch": "Szukaj", | ||||
|     "PagerNext": "Następna", | ||||
|     "PagerPrevious": "Poprzednia", | ||||
|     "PagerFirst": "Pierwsza", | ||||
|     "PagerLast": "Ostatnia", | ||||
|     "PagerInfo": "Pokaż od _START_ do _END_ z _TOTAL_ rekordów", | ||||
|     "PagerInfoEmpty": "Pokaż od 0 do 0 z 0 rekordów", | ||||
|     "PagerInfoFiltered": "(filtruj od _MAX_ wszystkich rekordów)", | ||||
|     "NoDataAvailableInDatatable": "Nie znaleziono danych w tabeli", | ||||
|     "PagerShowMenuEntries": "Pokaż _MENU_ rekordów", | ||||
|     "DatatableActionDropdownDefaultText": "Akcje", | ||||
|     "ChangePassword": "Zmień hasło", | ||||
|     "PersonalInfo": "Mój profil", | ||||
|     "AreYouSureYouWantToCancelEditingWarningMessage": "Masz niezapisane zmiany." | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,51 @@ | ||||
| { | ||||
|   "culture": "vi", | ||||
|   "texts": { | ||||
|     "InternalServerErrorMessage": "Có một lỗi nội bộ xảy ra trong quá trình thực hiện yêu cầu của bạn!", | ||||
|     "ValidationErrorMessage": "Yêu cầu của bạn không hợp lệ!", | ||||
|     "ValidationNarrativeErrorMessageTitle": "Các lỗi sau đây đã được phát hiện trong quá trình xác nhận", | ||||
|     "DefaultErrorMessage": "Một lỗi đã xảy ra", | ||||
|     "DefaultErrorMessageDetail": "Chi tiết lỗi không được gửi bởi máy chủ", | ||||
|     "DefaultErrorMessage401": "Bạn chưa được xác thực", | ||||
|     "DefaultErrorMessage401Detail": "Bạn cần đăng nhập để thực hiện thao tác này.", | ||||
|     "DefaultErrorMessage403": "Bạn không được phép!", | ||||
|     "DefaultErrorMessage403Detail": "Bạn không được phép thực hiện thao tác này!", | ||||
|     "DefaultErrorMessage404": "Tài nguyên không tìm thấy!", | ||||
|     "DefaultErrorMessage404Detail": "Tài nguyên được yêu cầu không được tìm thấy trên máy chủ!", | ||||
|     "EntityNotFoundErrorMessage": "Không có thực thể nào {0} với id = {1}!", | ||||
|     "Error": "Lỗi", | ||||
|     "AreYouSure": "Bạn có chắc không ?", | ||||
|     "Cancel": "Hủy bỏ", | ||||
|     "Yes": "Đồng ý", | ||||
|     "No": "Không", | ||||
|     "Close": "Đóng", | ||||
|     "Save": "Lưu", | ||||
|     "SavingWithThreeDot": "Đang lưu...", | ||||
|     "Actions": "Hành động", | ||||
|     "Delete": "Xóa", | ||||
|     "Edit": "Sửa", | ||||
|     "Refresh": "Làm mới", | ||||
|     "ProcessingWithThreeDot": "Đang xử lý...", | ||||
|     "LoadingWithThreeDot": "Đang tải...", | ||||
|     "Welcome": "Chào mừng bạn", | ||||
|     "Login": "Đăng nhập", | ||||
|     "Register": "Đăng ký", | ||||
|     "Logout": "Đăng xuất", | ||||
|     "Submit": "Gửi", | ||||
|     "Back": "Quay lại", | ||||
|     "PagerSearch": "Tìm kiếm", | ||||
|     "PagerNext": "Trang kế", | ||||
|     "PagerPrevious": "Trang trước", | ||||
|     "PagerFirst": "Trang đầu", | ||||
|     "PagerLast": "Trang cuối", | ||||
|     "PagerInfo": "Hiển thị từ _START_ đến _END_ trong _TOTAL_ mục", | ||||
|     "PagerInfoEmpty": "Hiển thị từ 0 đến 0 trong 0 mục", | ||||
|     "PagerInfoFiltered": "(được lọc từ tổng số _MAX_ mục)", | ||||
|     "NoDataAvailableInDatatable": "Không có dữ liệu trong bảng", | ||||
|     "PagerShowMenuEntries": "Hiển thị _MENU_ mục", | ||||
|     "DatatableActionDropdownDefaultText": "Hành động", | ||||
|     "ChangePassword": "Đổi mật khẩu", | ||||
|     "PersonalInfo": "Hồ sơ của tôi", | ||||
|     "AreYouSureYouWantToCancelEditingWarningMessage": "Bạn có những thay đổi chưa được lưu" | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,7 @@ | ||||
| { | ||||
|   "culture": "pl", | ||||
|   "texts": { | ||||
|     "BirthDate": "Data urodzenia", | ||||
|     "Value1": "Wartość jeden"  | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,7 @@ | ||||
| { | ||||
|   "culture": "vi", | ||||
|   "texts": { | ||||
|     "BirthDate": "Ngày sinh", | ||||
|     "Value1": "Giá trị thứ nhất"  | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,6 @@ | ||||
| { | ||||
|   "culture": "pl", | ||||
|   "texts": { | ||||
|     "hello": "witaj" | ||||
|   } | ||||
| } | ||||
| @ -0,0 +1,6 @@ | ||||
| { | ||||
|   "culture": "vi", | ||||
|   "texts": { | ||||
|     "hello": "xin chào" | ||||
|   } | ||||
| } | ||||
Some files were not shown because too many files have changed in this diff Show More
					Loading…
					
					
				
		Reference in new issue
	
	 liangshiwei
						liangshiwei