diff --git a/Directory.Packages.props b/Directory.Packages.props index b7e281d7aa..53d1ac72a0 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -66,6 +66,8 @@ + + diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json index 78231bb1af..f1dcba47a8 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json @@ -264,6 +264,7 @@ "EditProfile": "Edit Profile", "ConfirmEmailForPost": "To be able to post, you need to confirm your email. Go to account.abp.io/Account/Manage and verify your email in the Personal Info tab.", "DailyPostCreateLimitation": "You have reached the daily post creation limit. You can create a new post in {0}.", - "YourAccountDisabled": "Your user account is disabled!" + "YourAccountDisabled": "Your user account is disabled!", + "PostCreationFailed": "An error occurred while creating the post. Please try again later." } } diff --git a/build/common.ps1 b/build/common.ps1 index 51ab56d972..356f2d8329 100644 --- a/build/common.ps1 +++ b/build/common.ps1 @@ -23,6 +23,11 @@ $solutionPaths = @( "../modules/blob-storing-database" ) + # Remove MAUI related projects if not on Windows +if ($env:OS -ne "Windows_NT") { + dotnet sln ../framework/Volo.Abp.sln remove ../framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj +} + if ($full -eq "-f") { # List of additional solutions required for full build diff --git a/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/20250304_122158.webp b/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/20250304_122158.webp index 74733564b3..0157ed9011 100644 Binary files a/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/20250304_122158.webp and b/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/20250304_122158.webp differ diff --git a/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/20250304_153010.webp b/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/20250304_153010.webp index adae1b5d19..3d563385fe 100644 Binary files a/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/20250304_153010.webp and b/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/20250304_153010.webp differ diff --git a/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/IMG_4732-2000px.webp b/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/IMG_4732-2000px.webp index 93444b3d32..9b566f8509 100644 Binary files a/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/IMG_4732-2000px.webp and b/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/IMG_4732-2000px.webp differ diff --git a/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/IMG_4770-2000px.webp b/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/IMG_4770-2000px.webp index e7df098e88..6f0b03ffa4 100644 Binary files a/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/IMG_4770-2000px.webp and b/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/IMG_4770-2000px.webp differ diff --git a/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/IMG_4915-2000px.webp b/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/IMG_4915-2000px.webp index 47faaccf79..fc30a3d4b2 100644 Binary files a/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/IMG_4915-2000px.webp and b/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/IMG_4915-2000px.webp differ diff --git a/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/Screenshot_2025-03-04_at_13.47.28.webp b/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/Screenshot_2025-03-04_at_13.47.28.webp index cc11fb73c6..4df621a674 100644 Binary files a/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/Screenshot_2025-03-04_at_13.47.28.webp and b/docs/en/Community-Articles/2025-03-10-WE-HAD-A-BLAST-AT-BASTA-FRANKFURT-2025/Screenshot_2025-03-04_at_13.47.28.webp differ diff --git a/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/abp-js-proxy.png b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/abp-js-proxy.png new file mode 100644 index 0000000000..d7cfd05c5e Binary files /dev/null and b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/abp-js-proxy.png differ diff --git a/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/post.md b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/post.md new file mode 100644 index 0000000000..bc0b390b03 --- /dev/null +++ b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/post.md @@ -0,0 +1,324 @@ +# Using Vue components in a Razor Pages ABP Application + +In modern web development, integrating dynamic front-end frameworks with server-side technologies has become increasingly essential for creating responsive and interactive applications. This article explores how to effectively use Vue components within Razor Pages in an ABP Framework application. We will delve into the process of consuming endpoints through ABP Client Proxies, leveraging ABP's powerful localization features to enhance user experience, and implementing ABP permissions to ensure secure access control. By the end of this guide, you will have a comprehensive understanding of how to seamlessly blend Vue.js with Razor Pages, empowering you to build robust and user-friendly applications. + +This article won't use any SPA approach. The goal of this article is to use Razor Pages with simple Vue components to eliminate jQuery while developing MVC application. + +> **🎉 Also video version is available!** +> +> [Watch on YouTube Now!](https://youtu.be/sZ8iSMovHZs?si=GynuJjsLEI1p2g6w) + +## Creating the Solution + +Let's create a simple TODO list application to demonstrate how to use Vue components in Razor Pages. I'll build a really simple backend without a connection to a database for demonstration purposes. We will focus on the frontend part. + +- Creating a solution with ABP CLI: + +```bash +abp new MyTodoApp -t app-nolayers -csf +``` + +## Configure Vue + +We need to add the `@abp/vue` package to the project to use Vue components. + +```bash +npm install @abp/vue +``` + +- Install client libraries by using ABP CLI: + +```bash +abp install-libs +``` + +As a last step, we need to configure our bundle in the `ConfigureBundles` method in the `MyTodoAppModule.cs` file: + +```csharp +private void ConfigureBundles() +{ + Configure(options => + { + // ... + + options.ScriptBundles.Configure( + // Or BasicThemeBundles.Scripts.Global + // Or LeptonXLiteThemeBundles.Scripts.Global + // 👇 Depends on the theme you are using + LeptonXThemeBundles.Scripts.Global, + bundle => + { + bundle.AddFiles("/global-scripts.js"); + // 👇 Make sure to add this line + bundle.AddContributors(typeof(VueScriptContributor)); + } + ); + }); +} +``` + +> If your IDE doesn't recognize the namespace of the `VueScriptContributor`, you can add it manually: +> +> ```csharp +> using Volo.Abp.AspNetCore.Mvc.UI.Packages.Vue; +> ``` + +Now we're ready to use Vue components in our Razor Pages. + +## Creating a Vue Component + +Let's create a simple Vue component to display the TODO list. + +### Passing a simple message to the component + +- Remove existing HTML codes in `Index.cshtml` and replace with the following code: + +```html +
+ +
+``` + +- Navigate to the `Index.cshtml.js` file and add the following code: +```js +Vue.component('message-component', { + template: '
Hello, {{ message }}
', + props: ['message'] +}); + +new Vue({ + el: '#vue-app' +}); +``` + +Run the application and you should see the following output: + +![Vue Component](./vue-message.png) + +> _Hard refresh might be required to see the component since we added a new vue js file to the bundle._ +> +> If still you can't see the component, please check the browser console for any errors. + +### Interacting with the component + +Let's add a button to the component to interact with the component. + +- Add another component in the `Index.cshtml` file: + +```html +
+ + +
+``` + +```js +Vue.component('counter-component', { + template:` +
+
+

Count: {{ count }}

+ +
+
+ `, + data: function () { + return { + count: 0 + }; + }, + methods: { + increment: function () { + this.count++; + } + } +}); +``` + +> _Do not replicate `new Vue({})` code block in the file. It's already in the `Index.cshtml.js` file. Keep it at the bottom of the file as it is._ + +Run the application and you should see the following output: + +![Vue Component](./vue-counter-result.gif) + + +## Using ABP Client Proxy, Authorization and Localization + + +### Building the backend +Before we go, let's build our backend to use in the component. + +- Creating a simple Application Service: + +```csharp +public class TodoAppService : MyTodoAppAppService, ITodoAppService +{ + public static List Items { get; } = new List(); + + [Authorize("Todo.Create")] + public async Task AddTodoItemAsync(TodoItem input) + { + Items.Add(input); + return input; + } + + [Authorize("Todo")] + public async Task> GetAllAsync() + { + await Task.Delay(1500); + return Items; + } +} +``` + +- `TodoItem.cs` + +```csharp +public class TodoItem +{ + public string Description { get; set; } + public bool IsDone { get; set; } +} +``` + +- `ITodoAppService.cs` + +```csharp +public interface ITodoAppService +{ + Task> GetAllAsync(); + Task AddTodoItemAsync(TodoItem input); +} +``` + +- Run the application and if you can see the following client proxy in the browser console, you're ready to go: + + ![Client Proxy](./abp-js-proxy.png) + +> [!NOTE] +> If you can't see the client proxy in the browser console, please check the [Dynamic JavaScript Proxies](https://abp.io/docs/latest/framework/ui/mvc-razor-pages/dynamic-javascript-proxies) to learn how to enable it. + +- Add a new permission in the `MyTodoAppPermissionDefinitionProvider.cs` file: +```csharp +public override void Define(IPermissionDefinitionContext context) +{ + var myGroup = context.AddGroup(MyTodoAppPermissions.GroupName); + + var todo = myGroup.AddPermission("Todo"); + todo.AddChild("Todo.Create"); +} +``` +> _I go without localization or constants for simplicity._ + +- Add a localization key in the `en.json` file: + +```json +{ + "TodoItems": "Todo Items Localized" +} +``` + +### Building the Vue Component: Using ABP Localization, Authorization and Client Proxy + +Since the component it directly loaded into the page, we can access the `abp` object on the page. + +So we can use: + +- `abp.localization.localize()` to localize a string. +- `abp.auth.isGranted()` to check the authorization. +- `myTodoApp.todo.getAll()` and `myTodoApp.todo.addTodoItem` to call the Application Service. + +inside **Vue Component** code. + +- Let's add another component named `todo-component` and usee all the **ABP Features** in it. + +```html +
+ + +
+``` + +- Implement the `todo-component` in `Index.cshtml.js` file: + +```js +Vue.component('todo-component', { + template: ` +
+
+

{{ abp.localization.localize('TodoItems') }}

+
+
+
+
+ Loading... +
+
+
    +
  • + + +
  • +
+

No todos yet

+
+ +
+ `, + data: function () { + return { + newTodo: { + description: '', + isDone: false + }, + isBusy: false, + todos: [] + }; + }, + methods: { + addTodo() { + myTodoApp.todo.addTodoItem(this.newTodo); + this.newTodo = { description: '', isDone: false }; + this.todos.push(this.newTodo); + + // Preferrable, you can load entire list of todos again. + // this.loadTodos(); + }, + async loadTodos() { + if (!abp.auth.isGranted('Todo')) { + return; + } + this.isBusy = true; + this.todos = await myTodoApp.todo.getAll(); + this.isBusy = false; + } + }, + mounted() { + this.loadTodos(); + } +}); +``` + +And see the result: + +![Vue Component](./todo-component-result.gif) + + +Since we use `abp.auth.isGranted()` to check the authorization, we can see the component only if we have the permission. + +Whenever you remove `Todo.Create` permission, you can see the component is not rendered. + +![Todo Permission](./todo-permission.png) + + +You won't see the card footer: + +![Todo Permission](./todo-permission-vue.png) diff --git a/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/todo-component-result.gif b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/todo-component-result.gif new file mode 100644 index 0000000000..2eb50ee5c3 Binary files /dev/null and b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/todo-component-result.gif differ diff --git a/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/todo-permission-vue.png b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/todo-permission-vue.png new file mode 100644 index 0000000000..10a11c146f Binary files /dev/null and b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/todo-permission-vue.png differ diff --git a/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/todo-permission.png b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/todo-permission.png new file mode 100644 index 0000000000..f68e6eb20c Binary files /dev/null and b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/todo-permission.png differ diff --git a/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/vue-counter-result.gif b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/vue-counter-result.gif new file mode 100644 index 0000000000..656f001535 Binary files /dev/null and b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/vue-counter-result.gif differ diff --git a/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/vue-message.png b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/vue-message.png new file mode 100644 index 0000000000..a61963af44 Binary files /dev/null and b/docs/en/Community-Articles/2025-03-18-Using-Vue-Components/vue-message.png differ diff --git a/docs/en/Community-Articles/2025-03-23-Understanding-the-Embedded-Files-in-ABP-Framework/1.png b/docs/en/Community-Articles/2025-03-23-Understanding-the-Embedded-Files-in-ABP-Framework/1.png new file mode 100644 index 0000000000..f5cabbd4ef Binary files /dev/null and b/docs/en/Community-Articles/2025-03-23-Understanding-the-Embedded-Files-in-ABP-Framework/1.png differ diff --git a/docs/en/Community-Articles/2025-03-23-Understanding-the-Embedded-Files-in-ABP-Framework/2.png b/docs/en/Community-Articles/2025-03-23-Understanding-the-Embedded-Files-in-ABP-Framework/2.png new file mode 100644 index 0000000000..0aee0bf048 Binary files /dev/null and b/docs/en/Community-Articles/2025-03-23-Understanding-the-Embedded-Files-in-ABP-Framework/2.png differ diff --git a/docs/en/Community-Articles/2025-03-23-Understanding-the-Embedded-Files-in-ABP-Framework/3.png b/docs/en/Community-Articles/2025-03-23-Understanding-the-Embedded-Files-in-ABP-Framework/3.png new file mode 100644 index 0000000000..6c008bc372 Binary files /dev/null and b/docs/en/Community-Articles/2025-03-23-Understanding-the-Embedded-Files-in-ABP-Framework/3.png differ diff --git a/docs/en/Community-Articles/2025-03-23-Understanding-the-Embedded-Files-in-ABP-Framework/post.md b/docs/en/Community-Articles/2025-03-23-Understanding-the-Embedded-Files-in-ABP-Framework/post.md new file mode 100644 index 0000000000..5664fd8091 --- /dev/null +++ b/docs/en/Community-Articles/2025-03-23-Understanding-the-Embedded-Files-in-ABP-Framework/post.md @@ -0,0 +1,248 @@ +# Understanding the Embedded Files in ABP Framework + +Embedded Files functionality in .NET applications allows external files (like configuration files, images, etc.) to be directly embedded into assemblies (.exe or .dll). This simplifies deployment, prevents file loss or tampering, improves security and performance, and reduces path and dependency management issues. Through embedded resources, programs can access these files more conveniently without additional file operations. + +## Embedding Files in Your Project + +We embed `Volo\Abp\MyModule\Localization\*.json` files into the assembly in our `MyModule.csproj`. + +```xml + + + + net9.0 + Exe + enable + + + + + + + + + + + + + +``` + +If we check the `en.json` file in our IDE, we'll see it's embedded in the assembly. + +![image](1.png) + +When we decompile the built `MyModule.dll` file, we can also see the `en.json` file. + +![image](2.png) + +## Accessing Embedded Files in Code + +```csharp +public class Program +{ + public static async Task Main(string[] args) + { + var embeddedFiles = typeof(Program).Assembly.GetManifestResourceNames(); + foreach (var embeddedFile in embeddedFiles) + { + Console.WriteLine(embeddedFile); + var fileStream = typeof(Program).Assembly.GetManifestResourceStream(embeddedFile); + if (fileStream != null) + { + using var reader = new System.IO.StreamReader(fileStream); + var content = await reader.ReadToEndAsync(); + Console.WriteLine(content); + } + } + } +} +``` +This code will output the embedded file names and their contents. + +``` +MyModule.Volo.Abp.MyModule.Localization.en.json + +{ + "key":"value" +} +``` + +## Integrating with ABP Virtual File System + +The ABP Virtual File System makes it possible to manage files that don't physically exist on the file system (disk). It's mainly used to embed (js, css, image..) files into assemblies and use them like physical files at runtime. + +The following code shows how to add embedded files from the current application assembly to the ABP virtual file system: + +```csharp +[DependsOn(typeof(AbpVirtualFileSystemModule))] +public class MyModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + } +} +``` + +ABP creates an `AbpEmbeddedFileProvider` to access the embedded files. + +The full name of `en.json` is `MyModule.Volo.Abp.MyModule.Localization.en.json`. Without directory information, ABP uses `.` to split and assume directory information. This creates the following directory structure in the virtual file system: + +``` +[Dir] [/MyModule] +[Dir] [/MyModule/Volo] +[Dir] [/MyModule/Volo/Abp] +[Dir] [/MyModule/Volo/Abp/MyModule] +[Dir] [/MyModule/Volo/Abp/MyModule/Localization] +[File] [/MyModule/Volo/Abp/MyModule/Localization/en.json] +``` + +Now you can inject `IVirtualFileProvider` to access embedded files using the directory/file structure above. + +## Manifest Embedded File Provider + +You might have noticed that using `.` to split and assume directory information can cause confusion if filenames contain dots. + +For example, if your filename is `zh.hans.json`, ABP will generate the following directory structure, which isn't what we want: + +``` +[Dir] [/MyModule] +[Dir] [/MyModule/Volo] +[Dir] [/MyModule/Volo/Abp] +[Dir] [/MyModule/Volo/Abp/MyModule] +[Dir] [/MyModule/Volo/Abp/MyModule/Localization] +[Dir] [/MyModule/Volo/Abp/MyModule/Localization/zh] +[File] [/MyModule/Volo/Abp/MyModule/Localization/zh/hans.json] +``` + +Microsoft provides the `Microsoft.Extensions.FileProviders.Manifest` library to solve this problem. + +We need to add this package dependency and set `true` in our project: + +```xml + + + + net9.0 + Exe + enable + true + + + + + + + + + + + + + + +``` + +After rebuilding the project, when we decompile `MyModule.dll`, we'll see an additional `Microsoft.Extensions.FileProviders.Embedded.Manifest.xml` file. + +![image](3.png) + +This manifest file stores all the directory and file information of embedded resources. When ABP finds this file, it will use `ManifestEmbeddedFileProvider` instead of `AbpEmbeddedFileProvider` to access embedded files: + +```xml + + + 1.0 + + + Microsoft.Extensions.FileProviders.Embedded.Manifest.xml + + + + + + + MyModule.Volo.Abp.MyModule.Localization.zh.hans.json + + + + + + + +``` + +## Parameters of AddEmbedded Method + +The `AddEmbedded` method can take two parameters: + +### baseNamespace + +This may only be needed if you haven't used the `Manifest Embedded File Provider` and your project's `root namespace` isn't empty. In this case, set your root namespace here. + +The `root namespace` is your project's name by default. You can change it or set it to empty in the `csproj` file. + +```xml + + + MyModule + + +``` + +```xml + + + + + +``` + +```csharp +Configure(options => +{ + options.FileSets.AddEmbedded(baseNamespace: "MyModule"); +}); +``` + +``` +[Dir] [/Volo] +[Dir] [/Volo/Abp] +[Dir] [/Volo/Abp/MyModule] +[Dir] [/Volo/Abp/MyModule/Localization] +[File] [/Volo/Abp/MyModule/Localization/en.json] +``` + +### baseFolder + +If you don't want to expose all embedded files in the project, but only want to expose a specific folder (and sub folders/files), you can set the base folder relative to your project root folder. + +> baseFolder is only effective when using `Manifest Embedded File Provider`. + +You can set the `baseFolder` parameter to `/Volo/Abp/MyModule`, resulting in this directory structure: + +```csharp +Configure(options => +{ + options.FileSets.AddEmbedded(baseFolder: "/Volo/Abp/MyModule"); +}); +``` + +``` +[Dir] [Localization] +[File] [Localization/en.json] +``` + +## Summary + +We recommend using the `Manifest Embedded File Provider` in your projects and libraries. Hope this article has been helpful. + +## References + +[ABP Virtual File System](https://abp.io/docs/latest/framework/infrastructure/virtual-file-system) + +[Manifest Embedded File Provider](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/file-providers#manifest-embedded-file-provider) diff --git a/docs/en/images/account-pro-external-login-settings.png b/docs/en/images/account-pro-external-login-settings.png index da10489599..05ff28c045 100644 Binary files a/docs/en/images/account-pro-external-login-settings.png and b/docs/en/images/account-pro-external-login-settings.png differ diff --git a/docs/en/images/account-pro-select-account-parameter.png b/docs/en/images/account-pro-select-account-parameter.png new file mode 100644 index 0000000000..0037fe50e8 Binary files /dev/null and b/docs/en/images/account-pro-select-account-parameter.png differ diff --git a/docs/en/images/account-pro-select-account.png b/docs/en/images/account-pro-select-account.png new file mode 100644 index 0000000000..559b33f9c8 Binary files /dev/null and b/docs/en/images/account-pro-select-account.png differ diff --git a/docs/en/modules/account-pro.md b/docs/en/modules/account-pro.md index e3e7884cc0..4ccc8b316a 100644 --- a/docs/en/modules/account-pro.md +++ b/docs/en/modules/account-pro.md @@ -104,6 +104,48 @@ If you use `Social / External Logins`, It is automatically called for authentica ![account-pro-module-local-login-setting](../images/account-pro-module-local-login-setting.png) +### Switching users during OAuth login + +If you have an OAuth/Auth Server application using the Account Pro module, you can pass the `prompt=select_account` parameter to force the user to select an account. + +Example to pass `prompt=select_account` parameter in OpenIdConnect: + +```csharp +.AddAbpOpenIdConnect("oidc", options => +{ + // ... + options.Events = new OpenIdConnectEvents + { + OnRedirectToIdentityProvider = redirectContext => + { + redirectContext.ProtocolMessage.Prompt = "select_account"; + return Task.CompletedTask; + } + }; + // ... +}); +``` + +![account-pro-secect-account](../images/account-pro-select-account-parameter.png) + +You have three options: + +- Continue: The login process will continue with the current account. +- Switch to another account: Will be redirected to the login page to log in with another account. +- Create a new account: Will be redirected to the register page to create a new account. + +> The OAuth login process will continue after the user selects one of the options. + +![account-pro-secect-account](../images/account-pro-select-account.png) + +All available prompt parameters: + +| **Parameter** | **Description** | +|------------------|-------------------------------------------------------------------------------------------------------------| +| `login` | Forces the user to re-authenticate, even if they are already logged in. | +| `consent` | Forces the user to re-consent to the requested permissions, even if they have consented before. | +| `select_account` | Forces the user to select an account, even if they are already logged in (especially relevant if multiple accounts are available). | +| `none` | Does not trigger any prompt. If the user is not logged in, or their consent is not granted, it will return an error or redirect accordingly. | ## Social / External Logins @@ -113,7 +155,7 @@ The application startup template comes with **Twitter**, **Google** and **Micros ![account-pro-external-login-settings](../images/account-pro-external-login-settings.png) -The social/External login system is compatible with the multi-tenancy. Each tenant can configure their own provider settings if your application is multi-tenant. +The social/External login system is compatible with the multi-tenancy. Each tenant can enable or disable the external login provider and configure their own provider settings if your application is multi-tenant. ### Install a new External Login @@ -137,7 +179,7 @@ context.Services.AddAuthentication() facebook.Scope.Add("public_profile"); }) .WithDynamicOptions( - FacebookDefaults.AuthenticationScheme, + FacebookDefaults.AuthenticationScheme, // Facebook options => { options.WithProperty(x => x.AppId); @@ -149,6 +191,18 @@ context.Services.AddAuthentication() * `AddFacebook()` is the standard method that you can set hard-coded configuration. * `WithDynamicOptions` is provided by the Account Module which makes possible to configure the provided properties on the UI. +#### Localize Provider Properties + +You can add following translation to localize the properties of the external login providers: + +`en.json`: + +````json +"ExternalProvider:Facebook": "Facebook", +"ExternalProvider:Facebook:AppId": "App ID", +"ExternalProvider:Facebook:AppSecret": "App Secret", +```` + ### IPostConfigureAccountExternalProviderOptions Some external logins may be initialized based on dynamic properties. You can implement an `IPostConfigureAccountExternalProviderOptions` to initialize again after dynamic properties are initialized. diff --git a/docs/en/modules/gdpr.md b/docs/en/modules/gdpr.md index 76875e0403..c94fcbb4a0 100644 --- a/docs/en/modules/gdpr.md +++ b/docs/en/modules/gdpr.md @@ -48,7 +48,14 @@ The "Personal Data" page is used to manage personal data requests. You can view ![gdpr](../images/gdpr-personal-data-page.png) -To see the other features of the GDPR module, visit [the module description page](https://abp.io/modules/Volo.Gdpr). +The GDPR module is designed for distributed architectures. When a user requests their personal data, the module publishes two events: + +- `GdprUserDataRequestedEto`: Triggers personal data collectors to prepare user data +- `GdprUserDataDeletionRequestedEto`: Triggers personal data collectors to delete user data + +You can subscribe to these events to implement custom data collection and deletion logic in your modules. See the [Distributed Events](#distributed-events) section for more details. + +> To see the other features of the GDPR module, visit [the module description page](https://abp.io/modules/Volo.Gdpr). ## Options @@ -227,8 +234,13 @@ This [Event Transfer Object](../framework/infrastructure/event-bus/distributed#e ### GdprUserDataPreparedEto -This [Event Transfer Object](../framework/infrastructure/event-bus/distributed#event-transfer-object) is used to save the collected personal data into a single JSON file by module. +This [Event Transfer Object](../framework/infrastructure/event-bus/distributed#event-transfer-object) is used to save the collected personal data into a single JSON file per module. Typically, you don't need to implement this event handler since the module already has an implementation that returns the collected data within a zip file containing multiple JSON files, with each file containing data collected from a specific module. + +### GdprUserDataDeletionRequestedEto + +This [Event Transfer Object](../framework/infrastructure/event-bus/distributed#event-transfer-object) is published when a user requests to permanently delete their personal data and account. By default, only the `IdentityGdprEventHandler` in the [Identity Pro Module](../modules/identity-pro) subscribes to this event to anonymize the user's data and delete their account (using soft-delete unless configured otherwise). +If you want to delete additional sensitive user data stored in other modules, you can subscribe to this event and implement custom deletion (or anonymization) logic in those modules. ## Cookie Consent diff --git a/docs/en/release-info/migration-guides/identityserver4-step-by-step.md b/docs/en/release-info/migration-guides/identityserver4-step-by-step.md index 6e58edc023..12973b6073 100644 --- a/docs/en/release-info/migration-guides/identityserver4-step-by-step.md +++ b/docs/en/release-info/migration-guides/identityserver4-step-by-step.md @@ -76,7 +76,7 @@ typeof(AbpPermissionManagementDomainIdentityServerModule), DataSeeder is the most important part for starting the application since it seeds the initial data for both OpenID providers. -- Create a folder named *IdentityServer* under the Domain project and copy the [IdentityServerDataSeedContributor.cs](https://github.com/abpframework/abp-samples/blob/master/Ids2OpenId/src/Ids2OpenId.Domain/IdentityServer/IdentityServerDataSeedContributor.cs) under this folder. **Rename** all the `OpenId2Ids` with your project name. +- Create a folder named *IdentityServer* under the Domain project and copy the [IdentityServerDataSeedContributor.cs](https://github.com/abpframework/abp-samples/blob/1dc297255ca22af02ef6d71092dbc1b394f9260a/Ids2OpenId/src/Ids2OpenId.Domain/IdentityServer/IdentityServerDataSeedContributor.cs) under this folder. **Rename** all the `OpenId2Ids` with your project name. - Delete *OpenIddict* folder that contains `OpenIddictDataSeedContributor.cs` which is no longer needed. ### EntityFrameworkCore Layer diff --git a/docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md b/docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md index 79382f1b0a..3d33cbd7a1 100644 --- a/docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md +++ b/docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md @@ -254,6 +254,35 @@ We can visit the websites from a browser. ![Tiered IIS deployment](../../../images/iis-sample-tiered-deployment.gif) +## Fix 405 Method Not Allowed Error + +Remove `WebDAV` modules and handlers from the `Web.config` file. + +```xml + + + + + + + + + + + +``` + +Also remove the `WebDAV Publishing` feature from your computer if it's not being used. To do so, follow these steps: + +1. Select Start, type Turn Windows features on or off in the Start Search box, and then select Turn Windows features on or off. +2. In the Windows Features window, expand Internet Information Services -> World Wide Web Services -> Common HTTP Features. +3. Uncheck the WebDAV Publishing feature. + +See: + +- https://learn.microsoft.com/en-us/aspnet/web-api/overview/testing-and-debugging/troubleshooting-http-405-errors-after-publishing-web-api-applications#resolve-http-405-errors +- https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/iis/site-behavior-performance/http-error-405-website#resolution-for-cause-3 + ## How to get stdout-log If your application is running on IIS and getting errors like `502.5, 500.3x`, you can enable stdout logs to see the error details. diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln index 4c08cced94..78f7ae0011 100644 --- a/framework/Volo.Abp.sln +++ b/framework/Volo.Abp.sln @@ -481,6 +481,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Sms.TencentCloud", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Sms.TencentCloud.Tests", "test\Volo.Abp.Sms.TencenCloud.Tests\Volo.Abp.Sms.TencentCloud.Tests.csproj", "{C753DDD6-5699-45F8-8669-08CE0BB816DE}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Bundling", "src\Volo.Abp.AspNetCore.Bundling\Volo.Abp.AspNetCore.Bundling.csproj", "{75AA8A90-B3F6-43DF-ADA7-0990DEF44E2C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling", "src\Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling\Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj", "{70720321-DED4-464F-B913-BDA5BBDD7982}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.BlobStoring.Bunny", "src\Volo.Abp.BlobStoring.Bunny\Volo.Abp.BlobStoring.Bunny.csproj", "{1BBCBA72-CDB6-4882-96EE-D4CD149433A2}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.BlobStoring.Bunny.Tests", "test\Volo.Abp.BlobStoring.Bunny.Tests\Volo.Abp.BlobStoring.Bunny.Tests.csproj", "{BC4BB2D6-DFD8-4190-AAC3-32C0A7A8E915}" @@ -1441,6 +1445,14 @@ Global {C753DDD6-5699-45F8-8669-08CE0BB816DE}.Debug|Any CPU.Build.0 = Debug|Any CPU {C753DDD6-5699-45F8-8669-08CE0BB816DE}.Release|Any CPU.ActiveCfg = Release|Any CPU {C753DDD6-5699-45F8-8669-08CE0BB816DE}.Release|Any CPU.Build.0 = Release|Any CPU + {75AA8A90-B3F6-43DF-ADA7-0990DEF44E2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {75AA8A90-B3F6-43DF-ADA7-0990DEF44E2C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {75AA8A90-B3F6-43DF-ADA7-0990DEF44E2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {75AA8A90-B3F6-43DF-ADA7-0990DEF44E2C}.Release|Any CPU.Build.0 = Release|Any CPU + {70720321-DED4-464F-B913-BDA5BBDD7982}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70720321-DED4-464F-B913-BDA5BBDD7982}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70720321-DED4-464F-B913-BDA5BBDD7982}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70720321-DED4-464F-B913-BDA5BBDD7982}.Release|Any CPU.Build.0 = Release|Any CPU {1BBCBA72-CDB6-4882-96EE-D4CD149433A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1BBCBA72-CDB6-4882-96EE-D4CD149433A2}.Debug|Any CPU.Build.0 = Debug|Any CPU {1BBCBA72-CDB6-4882-96EE-D4CD149433A2}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -1695,6 +1707,8 @@ Global {E50739A7-5E2F-4EB5-AEA9-554115CB9613} = {447C8A77-E5F0-4538-8687-7383196D04EA} {BE7109C5-7368-4688-8557-4A15D3F4776A} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {C753DDD6-5699-45F8-8669-08CE0BB816DE} = {447C8A77-E5F0-4538-8687-7383196D04EA} + {75AA8A90-B3F6-43DF-ADA7-0990DEF44E2C} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} + {70720321-DED4-464F-B913-BDA5BBDD7982} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {1BBCBA72-CDB6-4882-96EE-D4CD149433A2} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {BC4BB2D6-DFD8-4190-AAC3-32C0A7A8E915} = {447C8A77-E5F0-4538-8687-7383196D04EA} {58FCF22D-E8DB-4EB8-B586-9BB6E9899D64} = {447C8A77-E5F0-4538-8687-7383196D04EA} diff --git a/framework/src/Volo.Abp.AspNetCore.Bundling/Volo.Abp.AspNetCore.Bundling.csproj b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo.Abp.AspNetCore.Bundling.csproj new file mode 100644 index 0000000000..2654005740 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo.Abp.AspNetCore.Bundling.csproj @@ -0,0 +1,19 @@ + + + + + + + net9.0 + enable + Nullable + + + + + + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/AbpAspNetCoreBundlingModule.cs b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/AbpAspNetCoreBundlingModule.cs new file mode 100644 index 0000000000..5e4967719f --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/AbpAspNetCoreBundlingModule.cs @@ -0,0 +1,15 @@ +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.Minify; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; + +namespace Volo.Abp.AspNetCore.Bundling; + +[DependsOn( + typeof(AbpAspNetCoreMvcUiBundlingAbstractionsModule), + typeof(AbpMinifyModule), + typeof(AbpVirtualFileSystemModule) +)] +public class AbpAspNetCoreBundlingModule : AbpModule +{ +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleCache.cs b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleCache.cs similarity index 88% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleCache.cs rename to framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleCache.cs index e00bc84d6c..5ade7fc088 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleCache.cs +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleCache.cs @@ -1,9 +1,10 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.DependencyInjection; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling; +namespace Volo.Abp.AspNetCore.Bundling; public class BundleCache : IBundleCache, ISingletonDependency { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleCacheItem.cs b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleCacheItem.cs similarity index 79% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleCacheItem.cs rename to framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleCacheItem.cs index f6830cbd74..f75f8b66db 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleCacheItem.cs +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleCacheItem.cs @@ -1,7 +1,8 @@ using System; using System.Collections.Generic; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling; +namespace Volo.Abp.AspNetCore.Bundling; public class BundleCacheItem { diff --git a/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleManagerBase.cs b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleManagerBase.cs new file mode 100644 index 0000000000..8563918113 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleManagerBase.cs @@ -0,0 +1,248 @@ +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Extensions.FileProviders; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Bundling.Scripts; +using Volo.Abp.AspNetCore.Bundling.Styles; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.VirtualFileSystem; + +namespace Volo.Abp.AspNetCore.Bundling; + +public abstract class BundleManagerBase : IBundleManager +{ + public ILogger Logger { get; set; } + + protected readonly AbpBundlingOptions Options; + protected readonly AbpBundleContributorOptions ContributorOptions; + protected readonly IScriptBundler ScriptBundler; + protected readonly IStyleBundler StyleBundler; + protected readonly IServiceProvider ServiceProvider; + protected readonly IDynamicFileProvider DynamicFileProvider; + protected readonly IBundleCache BundleCache; + + public BundleManagerBase( + IOptions options, + IOptions contributorOptions, + IScriptBundler scriptBundler, + IStyleBundler styleBundler, + IServiceProvider serviceProvider, + IDynamicFileProvider dynamicFileProvider, + IBundleCache bundleCache) + { + Options = options.Value; + ContributorOptions = contributorOptions.Value; + ScriptBundler = scriptBundler; + ServiceProvider = serviceProvider; + DynamicFileProvider = dynamicFileProvider; + BundleCache = bundleCache; + StyleBundler = styleBundler; + + Logger = NullLogger.Instance; + } + + public virtual async Task> GetStyleBundleFilesAsync(string bundleName) + { + return await GetBundleFilesAsync(Options.StyleBundles, bundleName, StyleBundler); + } + + public virtual async Task> GetScriptBundleFilesAsync(string bundleName) + { + return await GetBundleFilesAsync(Options.ScriptBundles, bundleName, ScriptBundler); + } + + protected virtual async Task> GetBundleFilesAsync(BundleConfigurationCollection bundles, + string bundleName, IBundler bundler) + { + var files = new List(); + + var contributors = GetContributors(bundles, bundleName); + var bundleFiles = await GetBundleFilesAsync(contributors); + var dynamicResources = await GetDynamicResourcesAsync(contributors); + + if (!IsBundlingEnabled()) + { + return bundleFiles.Union(dynamicResources).ToImmutableList(); + } + + var localBundleFiles = new List(); + foreach (var bundleFile in bundleFiles) + { + if (!bundleFile.IsExternalFile) + { + localBundleFiles.Add(bundleFile.FileName); + } + else + { + if (localBundleFiles.Count != 0) + { + files.AddRange(AddToBundleCache(bundleName, bundler, localBundleFiles).Files); + localBundleFiles.Clear(); + } + + files.Add(bundleFile); + } + } + + if (localBundleFiles.Count != 0) + { + files.AddRange(AddToBundleCache(bundleName, bundler, localBundleFiles).Files); + } + + return files.Union(dynamicResources).ToImmutableList(); + } + + private BundleCacheItem AddToBundleCache(string bundleName, IBundler bundler, List bundleFiles) + { + var bundleRelativePath = + Options.BundleFolderName.EnsureEndsWith('/') + + bundleName + "." + bundleFiles.JoinAsString("|").ToMd5() + "." + bundler.FileExtension; + + return BundleCache.GetOrAdd(bundleRelativePath, () => + { + var cacheValue = new BundleCacheItem( + new List { new BundleFile("/" + bundleRelativePath) } + ); + + WatchChanges(cacheValue, bundleFiles, bundleRelativePath); + + var bundleResult = bundler.Bundle( + new BundlerContext( + bundleRelativePath, + bundleFiles, + IsMinficationEnabled() + ) + ); + + SaveBundleResult(bundleRelativePath, bundleResult); + + return cacheValue; + }); + } + + private void WatchChanges(BundleCacheItem cacheValue, List files, string bundleRelativePath) + { + lock (cacheValue.WatchDisposeHandles) + { + foreach (var file in files) + { + var watchDisposeHandle = GetFileProvider().Watch(file).RegisterChangeCallback(_ => + { + lock (cacheValue.WatchDisposeHandles) + { + cacheValue.WatchDisposeHandles.ForEach(h => h.Dispose()); + cacheValue.WatchDisposeHandles.Clear(); + } + + BundleCache.Remove(bundleRelativePath); + DynamicFileProvider.Delete("/wwwroot/" + bundleRelativePath); //TODO: get rid of wwwroot! + }, null); + + cacheValue.WatchDisposeHandles.Add(watchDisposeHandle); + } + } + } + + protected virtual void SaveBundleResult(string bundleRelativePath, BundleResult bundleResult) + { + var fileName = bundleRelativePath.Substring(bundleRelativePath.IndexOf('/') + 1); + + DynamicFileProvider.AddOrUpdate( + new InMemoryFileInfo( + "/wwwroot/" + bundleRelativePath, //TODO: get rid of wwwroot! + Encoding.UTF8.GetBytes(bundleResult.Content), + fileName + ) + ); + } + + public abstract bool IsBundlingEnabled(); + + + protected abstract bool IsMinficationEnabled(); + + protected virtual async Task> GetBundleFilesAsync(List contributors) + { + var context = CreateBundleConfigurationContext(); + + foreach (var contributor in contributors) + { + await contributor.PreConfigureBundleAsync(context); + } + + foreach (var contributor in contributors) + { + await contributor.ConfigureBundleAsync(context); + } + + foreach (var contributor in contributors) + { + await contributor.PostConfigureBundleAsync(context); + } + + return context.Files; + } + + protected virtual async Task> GetDynamicResourcesAsync(List contributors) + { + var context = CreateBundleConfigurationContext(); + + foreach (var contributor in contributors) + { + await contributor.ConfigureDynamicResourcesAsync(context); + } + + return context.Files; + } + + protected virtual BundleConfigurationContext CreateBundleConfigurationContext() + { + return new BundleConfigurationContext(ServiceProvider, GetFileProvider(), + Options.Parameters); + } + + protected abstract IFileProvider GetFileProvider(); + + protected virtual List GetContributors(BundleConfigurationCollection bundles, string bundleName) + { + var contributors = new List(); + + AddContributorsWithBaseBundles(contributors, bundles, bundleName); + + for (var i = 0; i < contributors.Count; ++i) + { + var extensions = ContributorOptions.Extensions(contributors[i].GetType()).GetAll(); + if (extensions.Count > 0) + { + contributors.InsertRange(i + 1, extensions); + i += extensions.Count; + } + } + + return contributors; + } + + protected virtual void AddContributorsWithBaseBundles(List contributors, + BundleConfigurationCollection bundles, string bundleName) + { + var bundleConfiguration = bundles.Get(bundleName); + + foreach (var baseBundleName in bundleConfiguration.BaseBundles) + { + AddContributorsWithBaseBundles(contributors, bundles, baseBundleName); //Recursive call + } + + var selfContributors = bundleConfiguration.Contributors.GetAll(); + + if (selfContributors.Any()) + { + contributors.AddRange(selfContributors); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleResult.cs b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleResult.cs similarity index 75% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleResult.cs rename to framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleResult.cs index eb44dd585e..60ac2c0bc6 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleResult.cs +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundleResult.cs @@ -1,4 +1,4 @@ -namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling; +namespace Volo.Abp.AspNetCore.Bundling; public class BundleResult { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundlerBase.cs b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundlerBase.cs similarity index 93% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundlerBase.cs rename to framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundlerBase.cs index 4b0efe54ab..b52b9c204f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundlerBase.cs +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundlerBase.cs @@ -1,31 +1,27 @@ using System; using System.Text; -using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.DependencyInjection; using Volo.Abp.Minify; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling; +namespace Volo.Abp.AspNetCore.Bundling; public abstract class BundlerBase : IBundler, ITransientDependency { private static string[] _minFileSuffixes = { "min", "prod" }; public ILogger Logger { get; set; } - - protected IWebHostEnvironment HostEnvironment { get; } protected IMinifier Minifier { get; } protected AbpBundlingOptions BundlingOptions { get; } protected BundlerBase( - IWebHostEnvironment hostEnvironment, IMinifier minifier, IOptions bundlingOptions) { - HostEnvironment = hostEnvironment; Minifier = minifier; BundlingOptions = bundlingOptions.Value; @@ -123,7 +119,7 @@ public abstract class BundlerBase : IBundler, ITransientDependency protected virtual IFileInfo GetFileInfo(IBundlerContext context, string file) { - var fileInfo = HostEnvironment.WebRootFileProvider.GetFileInfo(file); + var fileInfo = FindFileInfo(file); if (!fileInfo.Exists) { @@ -150,7 +146,7 @@ public abstract class BundlerBase : IBundler, ITransientDependency { foreach (var suffix in _minFileSuffixes) { - var fileInfo = HostEnvironment.WebRootFileProvider.GetFileInfo( + var fileInfo = FindFileInfo( $"{file.RemovePostFix($".{FileExtension}")}.{suffix}.{FileExtension}" ); @@ -163,6 +159,8 @@ public abstract class BundlerBase : IBundler, ITransientDependency return null; } + protected abstract IFileInfo FindFileInfo(string file); + protected virtual string ProcessBeforeAddingToTheBundle(IBundlerContext context, string filePath, string fileContent) { return fileContent; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundlerContext.cs b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundlerContext.cs similarity index 91% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundlerContext.cs rename to framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundlerContext.cs index 9c9c60a9eb..e39fa90880 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundlerContext.cs +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/BundlerContext.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling; +namespace Volo.Abp.AspNetCore.Bundling; public class BundlerContext : IBundlerContext { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundleCache.cs b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundleCache.cs similarity index 78% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundleCache.cs rename to framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundleCache.cs index 9c2f19d4ca..6f80d23a60 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundleCache.cs +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundleCache.cs @@ -1,6 +1,6 @@ using System; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling; +namespace Volo.Abp.AspNetCore.Bundling; public interface IBundleCache { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundleManager.cs b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundleManager.cs similarity index 76% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundleManager.cs rename to framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundleManager.cs index 067554e102..3c3a50ece1 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundleManager.cs +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundleManager.cs @@ -1,7 +1,8 @@ using System.Collections.Generic; using System.Threading.Tasks; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling; +namespace Volo.Abp.AspNetCore.Bundling; public interface IBundleManager { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundler.cs b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundler.cs similarity index 58% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundler.cs rename to framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundler.cs index 9f396767ee..68e50f4ec7 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundler.cs +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundler.cs @@ -1,4 +1,6 @@ -namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; + +namespace Volo.Abp.AspNetCore.Bundling; public interface IBundler { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundlerContext.cs b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundlerContext.cs similarity index 81% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundlerContext.cs rename to framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundlerContext.cs index d59bc154b5..83d49df220 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/IBundlerContext.cs +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/IBundlerContext.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling; +namespace Volo.Abp.AspNetCore.Bundling; public interface IBundlerContext { diff --git a/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/Scripts/IScriptBundler.cs b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/Scripts/IScriptBundler.cs new file mode 100644 index 0000000000..2af5f655a7 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/Scripts/IScriptBundler.cs @@ -0,0 +1,6 @@ +namespace Volo.Abp.AspNetCore.Bundling.Scripts; + +public interface IScriptBundler : IBundler +{ + +} diff --git a/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/Styles/IStyleBundler.cs b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/Styles/IStyleBundler.cs new file mode 100644 index 0000000000..c8fe1cbf2a --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Bundling/Volo/Abp/AspNetCore/Bundling/Styles/IStyleBundler.cs @@ -0,0 +1,6 @@ +namespace Volo.Abp.AspNetCore.Bundling.Styles; + +public interface IStyleBundler : IBundler +{ + +} diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/AbpAspNetCoreComponentsMauiBlazorBundlingModule.cs b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/AbpAspNetCoreComponentsMauiBlazorBundlingModule.cs new file mode 100644 index 0000000000..2ffa74b833 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/AbpAspNetCoreComponentsMauiBlazorBundlingModule.cs @@ -0,0 +1,106 @@ +using System.Text; +using Microsoft.Extensions.FileProviders; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Bundling; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.Bundling.Styles; +using Volo.Abp.Modularity; +using Volo.Abp.Threading; +using Volo.Abp.VirtualFileSystem; + +namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling; + +[DependsOn( + typeof(AbpAspNetCoreComponentsMauiBlazorModule), + typeof(AbpAspNetCoreBundlingModule) +)] +public class AbpAspNetCoreComponentsMauiBlazorBundlingModule : AbpModule +{ + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + AsyncHelper.RunSync(() => OnApplicationInitializationAsync(context)); + } + + public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context) + { + await InitialGlobalAssetsAsync(context); + } + + protected virtual async Task InitialGlobalAssetsAsync(ApplicationInitializationContext context) + { + var bundlingOptions = context.ServiceProvider.GetRequiredService>().Value; + var logger = context.ServiceProvider.GetRequiredService>(); + if (!bundlingOptions.GlobalAssets.Enabled) + { + return; + } + + var bundleManager = context.ServiceProvider.GetRequiredService(); + var mauiBlazorContentFileProvider = context.ServiceProvider.GetRequiredService(); + var dynamicFileProvider = context.ServiceProvider.GetRequiredService(); + if (!bundlingOptions.GlobalAssets.GlobalStyleBundleName.IsNullOrWhiteSpace()) + { + var styleFiles = await bundleManager.GetStyleBundleFilesAsync(bundlingOptions.GlobalAssets.GlobalStyleBundleName); + var styles = string.Empty; + foreach (var file in styleFiles) + { + var fileInfo = mauiBlazorContentFileProvider.GetFileInfo(file.FileName); + if (!fileInfo.Exists) + { + logger.LogError($"Could not find the file: {file.FileName}"); + continue; + } + + var fileContent = await fileInfo.ReadAsStringAsync(); + if (!bundleManager.IsBundlingEnabled()) + { + fileContent = CssRelativePath.Adjust(fileContent, + file.FileName, + Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")); + + styles += $"/*{file.FileName}*/{Environment.NewLine}{fileContent}{Environment.NewLine}{Environment.NewLine}"; + } + else + { + styles += $"{fileContent}{Environment.NewLine}{Environment.NewLine}"; + } + } + + dynamicFileProvider.AddOrUpdate( + new InMemoryFileInfo("/wwwroot/" + bundlingOptions.GlobalAssets.CssFileName, + Encoding.UTF8.GetBytes(styles), + bundlingOptions.GlobalAssets.CssFileName)); + } + + if (!bundlingOptions.GlobalAssets.GlobalScriptBundleName.IsNullOrWhiteSpace()) + { + var scriptFiles = await bundleManager.GetScriptBundleFilesAsync(bundlingOptions.GlobalAssets.GlobalScriptBundleName); + var scripts = string.Empty; + foreach (var file in scriptFiles) + { + var fileInfo = mauiBlazorContentFileProvider.GetFileInfo(file.FileName); + if (!fileInfo.Exists) + { + logger.LogError($"Could not find the file: {file.FileName}"); + continue; + } + + var fileContent = await fileInfo.ReadAsStringAsync(); + if (!bundleManager.IsBundlingEnabled()) + { + scripts += $"{fileContent.EnsureEndsWith(';')}{Environment.NewLine}{Environment.NewLine}"; + } + else + { + scripts += $"//{file.FileName}{Environment.NewLine}{fileContent.EnsureEndsWith(';')}{Environment.NewLine}{Environment.NewLine}"; + } + } + + dynamicFileProvider.AddOrUpdate( + new InMemoryFileInfo("/wwwroot/" + bundlingOptions.GlobalAssets.JavaScriptFileName, + Encoding.UTF8.GetBytes(scripts), + bundlingOptions.GlobalAssets.JavaScriptFileName)); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/AbpBlazorWebView.cs b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/AbpBlazorWebView.cs new file mode 100644 index 0000000000..dce9f6d644 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/AbpBlazorWebView.cs @@ -0,0 +1,13 @@ +using Microsoft.AspNetCore.Components.WebView.Maui; +using Microsoft.Extensions.FileProviders; +using Volo.Abp.VirtualFileSystem; + +namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling; + +public class AbpBlazorWebView : BlazorWebView +{ + public override IFileProvider CreateFileProvider(string contentRootDir) + { + return new CompositeFileProvider(Handler!.GetRequiredService(), base.CreateFileProvider(contentRootDir)); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/BundleManager.cs b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/BundleManager.cs new file mode 100644 index 0000000000..3d8b0ab938 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/BundleManager.cs @@ -0,0 +1,125 @@ +using Microsoft.Extensions.FileProviders; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Bundling; +using Volo.Abp.AspNetCore.Bundling.Scripts; +using Volo.Abp.AspNetCore.Bundling.Styles; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.DependencyInjection; +using Volo.Abp.VirtualFileSystem; + +namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling; + +public class BundleManager : BundleManagerBase, ITransientDependency +{ + protected IMauiBlazorContentFileProvider MauiBlazorContentFileProvider { get; } + + public BundleManager( + IOptions options, + IOptions contributorOptions, + IScriptBundler scriptBundler, + IStyleBundler styleBundler, + IServiceProvider serviceProvider, + IDynamicFileProvider dynamicFileProvider, + IBundleCache bundleCache, + IMauiBlazorContentFileProvider mauiBlazorContentFileProvider) : base( + options, + contributorOptions, + scriptBundler, + styleBundler, + serviceProvider, + dynamicFileProvider, + bundleCache) + { + MauiBlazorContentFileProvider = mauiBlazorContentFileProvider; + } + + public override bool IsBundlingEnabled() + { + switch (Options.Mode) + { + case BundlingMode.None: + return false; + case BundlingMode.Bundle: + case BundlingMode.BundleAndMinify: + return true; + case BundlingMode.Auto: + return !IsDebug(); + default: + throw new AbpException($"Unhandled {nameof(BundlingMode)}: {Options.Mode}"); + } + } + + protected async override Task> GetBundleFilesAsync(List contributors) + { + var files = await base.GetBundleFilesAsync(contributors); + + foreach (var file in files) + { + await CopyFileToAppDataDirectoryAsync(file); + } + + return files; + } + + protected virtual async Task CopyFileToAppDataDirectoryAsync(BundleFile file) + { + if (file.IsExternalFile) + { + return; + } + + var fileName = Path.Combine("wwwroot", file.FileName); + if(MauiBlazorContentFileProvider.GetFileInfo(fileName).Exists) + { + return; + } + + try + { + await using var inputStream = await FileSystem.Current.OpenAppPackageFileAsync(fileName); + var targetFile = Path.Combine(FileSystem.Current.AppDataDirectory, fileName); + var fileDirectory = Path.GetDirectoryName(targetFile)!; + if (!Path.Exists(fileDirectory)) + { + Directory.CreateDirectory(fileDirectory); + } + await using var outputStream = File.Create(targetFile); + await inputStream.CopyToAsync(outputStream); + } + catch (Exception e) + { + Logger.LogError($"Could not copy the file to the app data directory: {fileName}", e); + } + } + + protected override bool IsMinficationEnabled() + { + switch (Options.Mode) + { + case BundlingMode.None: + case BundlingMode.Bundle: + return false; + case BundlingMode.BundleAndMinify: + return true; + case BundlingMode.Auto: + return !IsDebug(); + default: + throw new AbpException($"Unhandled {nameof(BundlingMode)}: {Options.Mode}"); + } + } + + protected virtual bool IsDebug() + { + #if DEBUG + return true; + #else + retur false; + #endif + } + + protected override IFileProvider GetFileProvider() + { + return MauiBlazorContentFileProvider; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/IMauiBlazorContentFileProvide.cs b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/IMauiBlazorContentFileProvide.cs new file mode 100644 index 0000000000..4c7a50a339 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/IMauiBlazorContentFileProvide.cs @@ -0,0 +1,8 @@ +using Microsoft.Extensions.FileProviders; + +namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling; + +public interface IMauiBlazorContentFileProvider : IFileProvider +{ + string ContentRootPath { get; } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/MauiBlazorBundlerBase.cs b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/MauiBlazorBundlerBase.cs new file mode 100644 index 0000000000..b02c80435a --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/MauiBlazorBundlerBase.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.FileProviders; +using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Bundling; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.Minify; + +namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling; + +public abstract class MauiBlazorBundlerBase : BundlerBase +{ + protected IMauiBlazorContentFileProvider MauiBlazorContentFileProvider { get; } + + public MauiBlazorBundlerBase( + IMauiBlazorContentFileProvider mauiBlazorContentFileProvider, + IMinifier minifier, + IOptions bundlingOptions) : base(minifier, + bundlingOptions) + { + MauiBlazorContentFileProvider = mauiBlazorContentFileProvider; + } + + protected override IFileInfo FindFileInfo(string file) + { + return MauiBlazorContentFileProvider.GetFileInfo(file); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/MauiBlazorContentFileProvider.cs b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/MauiBlazorContentFileProvider.cs new file mode 100644 index 0000000000..a9ee633e6c --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/MauiBlazorContentFileProvider.cs @@ -0,0 +1,65 @@ +using Microsoft.Extensions.FileProviders; +using Microsoft.Extensions.Primitives; +using Microsoft.Maui.Controls.PlatformConfiguration; +using Volo.Abp.DependencyInjection; +using Volo.Abp.VirtualFileSystem; + +namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling; + +public class MauiBlazorContentFileProvider : IMauiBlazorContentFileProvider, ISingletonDependency +{ + private readonly IVirtualFileProvider _virtualFileProvider; + private readonly IFileProvider _fileProvider; + private string _rootPath = "/wwwroot"; + + public MauiBlazorContentFileProvider(IVirtualFileProvider virtualFileProvider) + { + _virtualFileProvider = virtualFileProvider; + _fileProvider = CreateFileProvider(); + } + + public string ContentRootPath => FileSystem.Current.AppDataDirectory; + + public IFileInfo GetFileInfo(string subpath) + { + if (string.IsNullOrEmpty(subpath)) + { + return new NotFoundFileInfo(subpath); + } + + var fileInfo = _fileProvider.GetFileInfo(subpath); + return fileInfo.Exists ? fileInfo : _fileProvider.GetFileInfo( _rootPath + subpath.EnsureStartsWith('/')); + } + + public IDirectoryContents GetDirectoryContents(string subpath) + { + if (string.IsNullOrEmpty(subpath)) + { + return NotFoundDirectoryContents.Singleton; + } + + var directory = _fileProvider.GetDirectoryContents(subpath); + return directory.Exists ? directory : _fileProvider.GetDirectoryContents( _rootPath + subpath.EnsureStartsWith('/')); + } + + public IChangeToken Watch(string filter) + { + return new CompositeChangeToken( + [ + _fileProvider.Watch(_rootPath + filter), + _fileProvider.Watch(filter) + ] + ); + } + + protected virtual IFileProvider CreateFileProvider() + { + var assetsDirectory = Path.Combine(ContentRootPath, _rootPath.TrimStart('/')); + if (!Path.Exists(assetsDirectory)) + { + Directory.CreateDirectory(assetsDirectory); + } + + return new CompositeFileProvider(new PhysicalFileProvider(assetsDirectory), _virtualFileProvider); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Scripts/ScriptBundler.cs b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Scripts/ScriptBundler.cs new file mode 100644 index 0000000000..8e3d36b5da --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Scripts/ScriptBundler.cs @@ -0,0 +1,28 @@ +using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Bundling; +using Volo.Abp.AspNetCore.Bundling.Scripts; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.Minify.Scripts; + +namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.Scripts; + +public class ScriptBundler : MauiBlazorBundlerBase, IScriptBundler +{ + public override string FileExtension => "js"; + + public ScriptBundler( + IMauiBlazorContentFileProvider mauiBlazorContentFileProvider, + IJavascriptMinifier minifier, + IOptions bundlingOptions) + : base( + mauiBlazorContentFileProvider, + minifier, + bundlingOptions) + { + } + + protected override string ProcessBeforeAddingToTheBundle(IBundlerContext context, string filePath, string fileContent) + { + return fileContent.EnsureEndsWith(';') + Environment.NewLine; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Styles/StyleBundler.cs b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Styles/StyleBundler.cs new file mode 100644 index 0000000000..f617c21761 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Styles/StyleBundler.cs @@ -0,0 +1,40 @@ +using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Bundling; +using Volo.Abp.AspNetCore.Bundling.Styles; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using Volo.Abp.Bundling.Styles; +using Volo.Abp.Minify.Styles; + +namespace Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.Styles; + +public class StyleBundler : MauiBlazorBundlerBase, IStyleBundler +{ + private readonly IMauiBlazorContentFileProvider _mauiBlazorContentFileProvider; + public override string FileExtension => "css"; + + public StyleBundler( + IMauiBlazorContentFileProvider mauiBlazorContentFileProvider, + ICssMinifier minifier, + IOptions bundlingOptions) + : base( + mauiBlazorContentFileProvider, + minifier, + bundlingOptions) + { + _mauiBlazorContentFileProvider = mauiBlazorContentFileProvider; + } + + public string GetAbsolutePath(string relativePath) + { + return Path.Combine(_mauiBlazorContentFileProvider.ContentRootPath, "wwwroot", relativePath.RemovePreFix("/")).Replace("file://", ""); + } + + protected override string ProcessBeforeAddingToTheBundle(IBundlerContext context, string filePath, string fileContent) + { + return CssRelativePath.Adjust( + fileContent, + GetAbsolutePath(filePath), + GetAbsolutePath(context.BundleRelativePath) + ); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj new file mode 100644 index 0000000000..6591bd5359 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling.csproj @@ -0,0 +1,41 @@ + + + + + + + + net9.0-android;net9.0-ios;net9.0-maccatalyst + $(TargetFrameworks);net9.0-windows10.0.19041.0 + + + true + true + enable + enable + + 15.0 + 15.0 + 21.0 + 10.0.17763.0 + 10.0.17763.0 + 6.5 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Server.Theming/Bundling/BlazorServerComponentBundleManager.cs b/framework/src/Volo.Abp.AspNetCore.Components.Server.Theming/Bundling/BlazorServerComponentBundleManager.cs index 9ba0baff2d..98ca1b54a4 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Server.Theming/Bundling/BlazorServerComponentBundleManager.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.Server.Theming/Bundling/BlazorServerComponentBundleManager.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Volo.Abp.AspNetCore.Bundling; using Volo.Abp.AspNetCore.Components.Web.Theming.Bundling; -using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.DependencyInjection; namespace Volo.Abp.AspNetCore.Components.Server.Theming.Bundling; diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor index 8c9d070764..921937a124 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor @@ -1,4 +1,6 @@ +@implements IDisposable @inject IComponentBundleManager BundleManager +@inject PersistentComponentState ApplicationState @if (ScriptFiles != null) { foreach (var file in ScriptFiles) @@ -8,6 +10,9 @@ } @code { + + private const string PrerenderedKey = "abp_script_prerendered"; + [Parameter] public List? WebAssemblyScriptFiles { get; set; } @@ -16,18 +21,33 @@ private List? ScriptFiles { get; set; } + private PersistingComponentStateSubscription _persistingSubscription; + protected override async Task OnInitializedAsync() { - ScriptFiles = new List(); - - if (!BundleName.IsNullOrWhiteSpace()) + _persistingSubscription = ApplicationState.RegisterOnPersisting(Callback); + if (!ApplicationState.TryTakeFromJson(PrerenderedKey, out _)) { - ScriptFiles = (await BundleManager.GetScriptBundleFilesAsync(BundleName!)).ToList(); + // We are in prerendering mode + if (!BundleName.IsNullOrWhiteSpace()) + { + ScriptFiles = (await BundleManager.GetScriptBundleFilesAsync(BundleName!)).ToList(); + } } - - if (OperatingSystem.IsBrowser() && WebAssemblyScriptFiles != null) + else { - ScriptFiles.AddIfNotContains(WebAssemblyScriptFiles); + if (OperatingSystem.IsBrowser() && WebAssemblyScriptFiles != null) + { + ScriptFiles = WebAssemblyScriptFiles; + } } } + + private Task Callback() + { + ApplicationState.PersistAsJson(PrerenderedKey, PrerenderedKey); + return Task.CompletedTask; + } + + public void Dispose() => _persistingSubscription.Dispose(); } diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor index bdcfd26bec..0b522c02e4 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor @@ -1,4 +1,6 @@ +@implements IDisposable @inject IComponentBundleManager BundleManager +@inject PersistentComponentState ApplicationState @if (StyleFiles != null) { foreach (var file in StyleFiles) @@ -8,6 +10,9 @@ } @code { + + private const string PrerenderedKey = "abp_style_prerendered"; + [Parameter] public List? WebAssemblyStyleFiles { get; set; } @@ -16,18 +21,47 @@ private List? StyleFiles { get; set; } + private PersistingComponentStateSubscription _persistingSubscription; + protected override async Task OnInitializedAsync() { - StyleFiles = new List(); - - if (!BundleName.IsNullOrWhiteSpace()) + _persistingSubscription = ApplicationState.RegisterOnPersisting(Callback); + if (!ApplicationState.TryTakeFromJson>(PrerenderedKey, out var scriptFiles)) { - StyleFiles = (await BundleManager.GetStyleBundleFilesAsync(BundleName!)).ToList(); + // We are in prerendering mode + if (!BundleName.IsNullOrWhiteSpace()) + { + StyleFiles = (await BundleManager.GetStyleBundleFilesAsync(BundleName!)).ToList(); + } } + else + { + StyleFiles = scriptFiles; + if (OperatingSystem.IsBrowser() && StyleFiles != null && WebAssemblyStyleFiles != null) + { + StyleFiles.AddIfNotContains(WebAssemblyStyleFiles); + } + } + } - if (OperatingSystem.IsBrowser() && WebAssemblyStyleFiles != null) + private bool _hasRemoveServerStyle = false; + + protected override async Task OnAfterRenderAsync(bool firstRender) + { + if (!_hasRemoveServerStyle && OperatingSystem.IsBrowser() && WebAssemblyStyleFiles != null) { - StyleFiles.AddIfNotContains(WebAssemblyStyleFiles); + _hasRemoveServerStyle = true; + await Task.Delay(3000); + StyleFiles = WebAssemblyStyleFiles; + StateHasChanged(); } } + + private Task Callback() + { + ApplicationState.PersistAsJson(PrerenderedKey, StyleFiles); + return Task.CompletedTask; + } + + public void Dispose() => _persistingSubscription.Dispose(); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpBundleContributorOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpBundleContributorOptions.cs similarity index 93% rename from framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpBundleContributorOptions.cs rename to framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpBundleContributorOptions.cs index 79a6272e89..dfc706607e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpBundleContributorOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpBundleContributorOptions.cs @@ -1,6 +1,6 @@ -using System; +using System; using System.Collections.Concurrent; -using JetBrains.Annotations; +using System.Diagnostics.CodeAnalysis; namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling; @@ -27,4 +27,4 @@ public class AbpBundleContributorOptions _ => new BundleContributorCollection() ); } -} +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj index fd3995f797..aadb26f388 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj @@ -19,6 +19,7 @@ + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpAspNetCoreMvcUiBundlingModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpAspNetCoreMvcUiBundlingModule.cs index 2292c93a53..13b157748b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpAspNetCoreMvcUiBundlingModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/AbpAspNetCoreMvcUiBundlingModule.cs @@ -7,6 +7,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; using Volo.Abp.AspNetCore.VirtualFileSystem; using Volo.Abp.Bundling.Styles; @@ -21,8 +22,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling; [DependsOn( typeof(AbpAspNetCoreMvcUiBootstrapModule), - typeof(AbpMinifyModule), - typeof(AbpAspNetCoreMvcUiBundlingAbstractionsModule) + typeof(AbpAspNetCoreBundlingModule) )] public class AbpAspNetCoreMvcUiBundlingModule : AbpModule { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs index 9ac43585c0..c28c19a716 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs @@ -9,6 +9,10 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; +using Microsoft.Extensions.FileProviders; +using Volo.Abp.AspNetCore.Bundling; +using Volo.Abp.AspNetCore.Bundling.Scripts; +using Volo.Abp.AspNetCore.Bundling.Styles; using Volo.Abp.AspNetCore.Mvc.UI.Bundling.Scripts; using Volo.Abp.AspNetCore.Mvc.UI.Bundling.Styles; using Volo.Abp.AspNetCore.Mvc.UI.Resources; @@ -17,162 +21,47 @@ using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling; -public class BundleManager : IBundleManager, ITransientDependency +public class BundleManager : BundleManagerBase, ITransientDependency { - public ILogger Logger { get; set; } - - protected readonly AbpBundlingOptions Options; - protected readonly AbpBundleContributorOptions ContributorOptions; - protected readonly IWebHostEnvironment HostingEnvironment; - protected readonly IScriptBundler ScriptBundler; - protected readonly IStyleBundler StyleBundler; - protected readonly IServiceProvider ServiceProvider; - protected readonly IDynamicFileProvider DynamicFileProvider; - protected readonly IBundleCache BundleCache; - protected readonly IWebRequestResources RequestResources; - public BundleManager( IOptions options, IOptions contributorOptions, - IScriptBundler scriptBundler, + IScriptBundler scriptBundler, IStyleBundler styleBundler, - IWebHostEnvironment hostingEnvironment, IServiceProvider serviceProvider, IDynamicFileProvider dynamicFileProvider, IBundleCache bundleCache, - IWebRequestResources requestResources) + IWebHostEnvironment hostingEnvironment, + IWebRequestResources requestResources) : base( + options, + contributorOptions, + scriptBundler, + styleBundler, + serviceProvider, + dynamicFileProvider, + bundleCache) { - Options = options.Value; - ContributorOptions = contributorOptions.Value; HostingEnvironment = hostingEnvironment; - ScriptBundler = scriptBundler; - ServiceProvider = serviceProvider; - DynamicFileProvider = dynamicFileProvider; - BundleCache = bundleCache; RequestResources = requestResources; - StyleBundler = styleBundler; - - Logger = NullLogger.Instance; - } - - public virtual async Task> GetStyleBundleFilesAsync(string bundleName) - { - return await GetBundleFilesAsync(Options.StyleBundles, bundleName, StyleBundler); - } - - public virtual async Task> GetScriptBundleFilesAsync(string bundleName) - { - return await GetBundleFilesAsync(Options.ScriptBundles, bundleName, ScriptBundler); - } - - protected virtual async Task> GetBundleFilesAsync(BundleConfigurationCollection bundles, string bundleName, IBundler bundler) - { - var files = new List(); - - var contributors = GetContributors(bundles, bundleName); - var bundleFiles = RequestResources.TryAdd(await GetBundleFilesAsync(contributors)); - var dynamicResources = RequestResources.TryAdd(await GetDynamicResourcesAsync(contributors)); - - if (!IsBundlingEnabled()) - { - return bundleFiles.Union(dynamicResources).ToImmutableList(); - } - - var localBundleFiles = new List(); - foreach (var bundleFile in bundleFiles) - { - if (!bundleFile.IsExternalFile) - { - localBundleFiles.Add(bundleFile.FileName); - } - else - { - if (localBundleFiles.Count != 0) - { - files.AddRange(AddToBundleCache(bundleName, bundler, localBundleFiles).Files); - localBundleFiles.Clear(); - } - - files.Add(bundleFile); - } - } - - if (localBundleFiles.Count != 0) - { - files.AddRange(AddToBundleCache(bundleName, bundler, localBundleFiles).Files); - } - - return files.Union(dynamicResources).ToImmutableList(); } - private BundleCacheItem AddToBundleCache(string bundleName, IBundler bundler, List bundleFiles) - { - var bundleRelativePath = - Options.BundleFolderName.EnsureEndsWith('/') + - bundleName + "." + bundleFiles.JoinAsString("|").ToMd5() + "." + bundler.FileExtension; - - return BundleCache.GetOrAdd(bundleRelativePath, () => - { - var cacheValue = new BundleCacheItem( - new List - { - new BundleFile("/" + bundleRelativePath) - } - ); - - WatchChanges(cacheValue, bundleFiles, bundleRelativePath); + protected IWebHostEnvironment HostingEnvironment { get; } - var bundleResult = bundler.Bundle( - new BundlerContext( - bundleRelativePath, - bundleFiles, - IsMinficationEnabled() - ) - ); + protected IWebRequestResources RequestResources { get; } - SaveBundleResult(bundleRelativePath, bundleResult); - return cacheValue; - }); - } - private void WatchChanges(BundleCacheItem cacheValue, List files, string bundleRelativePath) + protected async override Task> GetBundleFilesAsync(List contributors) { - lock (cacheValue.WatchDisposeHandles) - { - foreach (var file in files) - { - var watchDisposeHandle = HostingEnvironment.WebRootFileProvider.Watch(file).RegisterChangeCallback(_ => - { - lock (cacheValue.WatchDisposeHandles) - { - cacheValue.WatchDisposeHandles.ForEach(h => h.Dispose()); - cacheValue.WatchDisposeHandles.Clear(); - } - - BundleCache.Remove(bundleRelativePath); - DynamicFileProvider.Delete("/wwwroot/" + bundleRelativePath); //TODO: get rid of wwwroot! - }, null); - - cacheValue.WatchDisposeHandles.Add(watchDisposeHandle); - } - } + return RequestResources.TryAdd(await base.GetBundleFilesAsync(contributors)); } - protected virtual void SaveBundleResult(string bundleRelativePath, BundleResult bundleResult) + protected async override Task> GetDynamicResourcesAsync(List contributors) { - var fileName = bundleRelativePath.Substring(bundleRelativePath.IndexOf('/') + 1); - - DynamicFileProvider.AddOrUpdate( - new InMemoryFileInfo( - "/wwwroot/" + bundleRelativePath, //TODO: get rid of wwwroot! - Encoding.UTF8.GetBytes(bundleResult.Content), - fileName - ) - ); + return RequestResources.TryAdd(await base.GetDynamicResourcesAsync(contributors)); } - public virtual bool IsBundlingEnabled() + public override bool IsBundlingEnabled() { switch (Options.Mode) { @@ -188,7 +77,7 @@ public class BundleManager : IBundleManager, ITransientDependency } } - protected virtual bool IsMinficationEnabled() + protected override bool IsMinficationEnabled() { switch (Options.Mode) { @@ -204,78 +93,8 @@ public class BundleManager : IBundleManager, ITransientDependency } } - protected async Task> GetBundleFilesAsync(List contributors) - { - var context = CreateBundleConfigurationContext(); - - foreach (var contributor in contributors) - { - await contributor.PreConfigureBundleAsync(context); - } - - foreach (var contributor in contributors) - { - await contributor.ConfigureBundleAsync(context); - } - - foreach (var contributor in contributors) - { - await contributor.PostConfigureBundleAsync(context); - } - - return context.Files; - } - - protected virtual async Task> GetDynamicResourcesAsync(List contributors) - { - var context = CreateBundleConfigurationContext(); - - foreach (var contributor in contributors) - { - await contributor.ConfigureDynamicResourcesAsync(context); - } - - return context.Files; - } - - protected virtual BundleConfigurationContext CreateBundleConfigurationContext() - { - return new BundleConfigurationContext(ServiceProvider, HostingEnvironment.WebRootFileProvider, Options.Parameters); - } - - protected virtual List GetContributors(BundleConfigurationCollection bundles, string bundleName) - { - var contributors = new List(); - - AddContributorsWithBaseBundles(contributors, bundles, bundleName); - - for (var i = 0; i < contributors.Count; ++i) - { - var extensions = ContributorOptions.Extensions(contributors[i].GetType()).GetAll(); - if (extensions.Count > 0) - { - contributors.InsertRange(i + 1, extensions); - i += extensions.Count; - } - } - - return contributors; - } - - protected virtual void AddContributorsWithBaseBundles(List contributors, BundleConfigurationCollection bundles, string bundleName) + protected override IFileProvider GetFileProvider() { - var bundleConfiguration = bundles.Get(bundleName); - - foreach (var baseBundleName in bundleConfiguration.BaseBundles) - { - AddContributorsWithBaseBundles(contributors, bundles, baseBundleName); //Recursive call - } - - var selfContributors = bundleConfiguration.Contributors.GetAll(); - - if (selfContributors.Any()) - { - contributors.AddRange(selfContributors); - } + return HostingEnvironment.WebRootFileProvider; } -} +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/MvcUiBundlerBase.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/MvcUiBundlerBase.cs new file mode 100644 index 0000000000..87ba769f75 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/MvcUiBundlerBase.cs @@ -0,0 +1,25 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.FileProviders; +using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Bundling; +using Volo.Abp.Minify; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling; + +public abstract class MvcUiBundlerBase : BundlerBase +{ + protected IWebHostEnvironment WebHostingEnvironment { get; } + + protected MvcUiBundlerBase( + IWebHostEnvironment webHostingEnvironment, + IMinifier minifier, + IOptions bundlingOptions) : base(minifier, bundlingOptions) + { + WebHostingEnvironment = webHostingEnvironment; + } + + protected override IFileInfo FindFileInfo(string file) + { + return WebHostingEnvironment.WebRootFileProvider.GetFileInfo(file); + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Scripts/IScriptBundler.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Scripts/IScriptBundler.cs deleted file mode 100644 index a0204fdb87..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Scripts/IScriptBundler.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.Scripts; - -public interface IScriptBundler : IBundler -{ - -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Scripts/ScriptBundler.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Scripts/ScriptBundler.cs index 7e3360e4c8..8f48ad31e8 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Scripts/ScriptBundler.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Scripts/ScriptBundler.cs @@ -1,20 +1,22 @@ using System; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Bundling; +using Volo.Abp.AspNetCore.Bundling.Scripts; using Volo.Abp.Minify.Scripts; namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.Scripts; -public class ScriptBundler : BundlerBase, IScriptBundler +public class ScriptBundler : MvcUiBundlerBase, IScriptBundler { public override string FileExtension => "js"; public ScriptBundler( - IWebHostEnvironment hostEnvironment, + IWebHostEnvironment hostingEnvironment, IJavascriptMinifier minifier, IOptions bundlingOptions) : base( - hostEnvironment, + hostingEnvironment, minifier, bundlingOptions) { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/IStyleBundler.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/IStyleBundler.cs deleted file mode 100644 index 1550730d38..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/IStyleBundler.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.Styles; - -public interface IStyleBundler : IBundler -{ - -} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/StyleBundler.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/StyleBundler.cs index b20e9af7ee..9d6277fa8e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/StyleBundler.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/StyleBundler.cs @@ -2,27 +2,28 @@ using System; using System.IO; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Options; -using Volo.Abp.AspNetCore.VirtualFileSystem; +using Volo.Abp.AspNetCore.Bundling; +using Volo.Abp.AspNetCore.Bundling.Styles; using Volo.Abp.Bundling.Styles; using Volo.Abp.Minify.Styles; namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.Styles; -public class StyleBundler : BundlerBase, IStyleBundler +public class StyleBundler : MvcUiBundlerBase, IStyleBundler { private readonly IWebHostEnvironment _hostingEnvironment; public override string FileExtension => "css"; public StyleBundler( - IWebHostEnvironment hostEnvironment, + IWebHostEnvironment hostingEnvironment, ICssMinifier minifier, IOptions bundlingOptions) : base( - hostEnvironment, + hostingEnvironment, minifier, bundlingOptions) { - _hostingEnvironment = hostEnvironment; + _hostingEnvironment = hostingEnvironment; } public string GetAbsolutePath(string relativePath) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs index 7939cb7912..b83d090f11 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs @@ -10,6 +10,7 @@ using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Bundling; using Volo.Abp.DependencyInjection; namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs index c8486ebadd..c4701aa7d5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs @@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Razor.TagHelpers; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Bundling; namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs index bcfd7d95e2..1ed3a76fe1 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs @@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Razor.TagHelpers; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Bundling; using Volo.Abp.AspNetCore.Security; namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionFilter.cs index f09cde9815..1c616e7a8a 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionFilter.cs @@ -109,9 +109,12 @@ public class AbpExceptionFilter : IAsyncExceptionFilter, IAbpFilter, ITransientD remoteServiceErrorInfoBuilder.AppendLine($"---------- {nameof(RemoteServiceErrorInfo)} ----------"); remoteServiceErrorInfoBuilder.AppendLine(context.GetRequiredService().Serialize(remoteServiceErrorInfo, indented: true)); - var logger = context.GetService>(NullLogger.Instance)!; - var logLevel = context.Exception.GetLogLevel(); - logger.LogWithLevel(logLevel, remoteServiceErrorInfoBuilder.ToString()); - logger.LogException(context.Exception, logLevel); + if(exceptionHandlingOptions.ShouldLogException(context.Exception)) + { + var logger = context.GetService>(NullLogger.Instance)!; + var logLevel = context.Exception.GetLogLevel(); + logger.LogWithLevel(logLevel, remoteServiceErrorInfoBuilder.ToString()); + logger.LogException(context.Exception, logLevel); + } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionPageFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionPageFilter.cs index 0e53b01cad..d8300eef04 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionPageFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/AbpExceptionPageFilter.cs @@ -90,10 +90,12 @@ public class AbpExceptionPageFilter : IAsyncPageFilter, IAbpFilter, ITransientDe remoteServiceErrorInfoBuilder.AppendLine($"---------- {nameof(RemoteServiceErrorInfo)} ----------"); remoteServiceErrorInfoBuilder.AppendLine(context.GetRequiredService().Serialize(remoteServiceErrorInfo, indented: true)); - var logger = context.GetService>(NullLogger.Instance)!; - logger.LogWithLevel(logLevel, remoteServiceErrorInfoBuilder.ToString()); - - logger.LogException(context.Exception!, logLevel); + if (context.Exception != null && exceptionHandlingOptions.ShouldLogException(context.Exception)) + { + var logger = context.GetService>(NullLogger.Instance)!; + logger.LogWithLevel(logLevel, remoteServiceErrorInfoBuilder.ToString()); + logger.LogException(context.Exception!, logLevel); + } await context.GetRequiredService().NotifyAsync(new ExceptionNotificationContext(context.Exception!)); @@ -113,6 +115,7 @@ public class AbpExceptionPageFilter : IAsyncPageFilter, IAbpFilter, ITransientDe } else { + var logger = context.GetService>(NullLogger.Instance)!; logger.LogWarning("HTTP response has already started, cannot set headers and status code!"); } diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs index c99ac00fcc..c098ba2c15 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingMiddleware.cs @@ -58,7 +58,12 @@ public class AbpExceptionHandlingMiddleware : AbpMiddlewareBase, ITransientDepen private async Task HandleAndWrapException(HttpContext httpContext, Exception exception) { - _logger.LogException(exception); + var exceptionHandlingOptions = httpContext.RequestServices.GetRequiredService>().Value; + + if (exceptionHandlingOptions.ShouldLogException(exception)) + { + _logger.LogException(exception); + } await httpContext .RequestServices @@ -77,7 +82,6 @@ public class AbpExceptionHandlingMiddleware : AbpMiddlewareBase, ITransientDepen var errorInfoConverter = httpContext.RequestServices.GetRequiredService(); var statusCodeFinder = httpContext.RequestServices.GetRequiredService(); var jsonSerializer = httpContext.RequestServices.GetRequiredService(); - var exceptionHandlingOptions = httpContext.RequestServices.GetRequiredService>().Value; httpContext.Response.Clear(); httpContext.Response.StatusCode = (int)statusCodeFinder.GetStatusCode(httpContext, exception); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SuiteCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SuiteCommand.cs index d8a3b6d154..48f5eca5f8 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SuiteCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SuiteCommand.cs @@ -107,6 +107,9 @@ public class SuiteCommand : IConsoleCommand, ITransientDependency Logger.LogInformation("Removing ABP Suite..."); RemoveSuite(); break; + + default: + throw new CliUsageException("Invalid Suite command! Run \"abp help suite\" command to see available Suite commands."); } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs index 5ef3657529..411be841ed 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs @@ -137,10 +137,18 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency ? $"The specified template version ({templateVersion}) is different than the CLI version ({currentCliVersion}). This may cause compatibility issues." : $"The latest template version ({templateVersion}) is different than the CLI version ({currentCliVersion}). This may cause compatibility issues."); Logger.LogWarning("Please upgrade/downgrade the CLI version to the template version."); - Logger.LogWarning($"> dotnet tool uninstall -g volo.abp.cli"); - Logger.LogWarning(!templateVersion.IsPrerelease - ? $"> dotnet tool install -g volo.abp.cli --version \"{templateVersion.Major}.{templateVersion.Minor}.*\"" - : $"> dotnet tool install -g volo.abp.cli --version {templateVersion}"); + + if (currentCliVersion.ToString().EndsWith("-studio")) + { + Logger.LogWarning($"> abp install-old-cli --version {templateVersion}"); + } + else + { + Logger.LogWarning($"> dotnet tool uninstall -g volo.abp.cli"); + Logger.LogWarning(!templateVersion.IsPrerelease + ? $"> dotnet tool install -g volo.abp.cli --version \"{templateVersion.Major}.{templateVersion.Minor}.*\"" + : $"> dotnet tool install -g volo.abp.cli --version {templateVersion}"); + } if (userSpecifiedVersion) { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Version/CliVersionService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Version/CliVersionService.cs index eb5c13a561..0bb8536162 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Version/CliVersionService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Version/CliVersionService.cs @@ -34,6 +34,11 @@ public class CliVersionService : ITransientDependency break; } + if (line.StartsWith("volo.abp.studio.cli", StringComparison.InvariantCultureIgnoreCase)) + { + var assemblyVersion = string.Join(".", Assembly.GetExecutingAssembly().GetFileVersion().Split('.').Take(3)); + return SemanticVersion.Parse(assemblyVersion + "-studio"); + } } if (currentCliVersion == null) diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj index bc8ec71f9a..3b039a3ef0 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj @@ -22,7 +22,6 @@ - diff --git a/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingOptions.cs b/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingOptions.cs index e3bde2e813..cc751fc621 100644 --- a/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingOptions.cs +++ b/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/AspNetCore/ExceptionHandling/AbpExceptionHandlingOptions.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Volo.Abp.AspNetCore.ExceptionHandling; @@ -11,6 +12,12 @@ public class AbpExceptionHandlingOptions public List SendExceptionDataToClientTypes { get; set; } + /// + /// Selectors to exclude exception from logging. + /// If a selector returns true, the exception is not logged in to the logging. + /// + public List> ExcludeExceptionFromLoggerSelectors { get; } + public AbpExceptionHandlingOptions() { SendExceptionsDetailsToClients = false; @@ -19,5 +26,11 @@ public class AbpExceptionHandlingOptions [ typeof(IBusinessException) ]; + ExcludeExceptionFromLoggerSelectors = new List>(); + } + + public bool ShouldLogException(Exception exception) + { + return ExcludeExceptionFromLoggerSelectors.All(selector => !selector(exception)); } } diff --git a/modules/account/src/Volo.Abp.Account.Installer/InstallationNotes.md b/modules/account/src/Volo.Abp.Account.Installer/InstallationNotes.md new file mode 100644 index 0000000000..2289069146 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Installer/InstallationNotes.md @@ -0,0 +1,9 @@ +# Installation Notes for Account Module + +Account module implements the basic authentication features like login, register, forgot password and account management. + +This module is based on [Microsoft's Identity library](https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-6.0&tabs=visual-studio) and the [Identity Module](https://docs.abp.io/en/abp/latest/modules/identity). It has [IdentityServer](https://docs.abp.io/en/abp/latest/modules/identity-server) integration (based on the [IdentityServer Module](https://docs.abp.io/en/abp/latest/modules/identity-server)) and [OpenIddict](https://github.com/openiddict) integration (based on the [Openiddict Module](https://docs.abp.io/en/abp/latest/modules/openiddict)) to provide single sign-on, access control and other advanced authentication features. + +## Documentation + +For detailed information and usage instructions, please visit the [Account Module documentation](https://abp.io/docs/latest/Modules/Account). \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/InstallationNotes.md b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/InstallationNotes.md new file mode 100644 index 0000000000..35bd77d32d --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/InstallationNotes.md @@ -0,0 +1,9 @@ +# Installation Notes for Audit Logging Module + +The ABP Audit Logging module provides automatic audit logging for web requests, service methods, and entity changes. It helps you track user activities and changes in your application. + +This module is part of the ABP Framework and provides comprehensive audit logging capabilities including entity history tracking, exception logging, and user activity monitoring. + +## Documentation + +For detailed information and usage instructions, please visit the [Audit Logging documentation](https://abp.io/docs/latest/framework/infrastructure/audit-logging). \ No newline at end of file diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/InstallationNotes.md b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/InstallationNotes.md new file mode 100644 index 0000000000..953695c647 --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/InstallationNotes.md @@ -0,0 +1,12 @@ +# Installation Notes for Background Jobs Module + +Background jobs are used to queue some tasks to be executed in the background. You may need background jobs for several reasons. Here are some examples: + +- To perform **long-running tasks** without having the users wait. For example, a user presses a 'report' button to start a long-running reporting job. You add this job to the **queue** and send the report's result to your user via email when it's completed. +- To create **re-trying** and **persistent tasks** to **guarantee** that a code will be **successfully executed**. For example, you can send emails in a background job to overcome **temporary failures** and **guarantee** that it eventually will be sent. That way users do not wait while sending emails. + +Background jobs are **persistent** that means they will be **re-tried** and **executed** later even if your application crashes. + +## Documentation + +For detailed information and usage instructions, please visit the [Background Jobs documentation](https://abp.io/docs/latest/framework/infrastructure/background-jobs). \ No newline at end of file diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/WebAssemblyRedirectToLogin.razor b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/WebAssemblyRedirectToLogin.razor index 97e0eb2995..f4f3e152ce 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/WebAssemblyRedirectToLogin.razor +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/WebAssemblyRedirectToLogin.razor @@ -15,7 +15,7 @@ { if (AbpAspNetCoreComponentsWebOptions.Value.IsBlazorWebApp) { - Navigation.NavigateTo(AuthenticationOptions.Value.LogoutUrl, forceLoad: true); + Navigation.NavigateTo(AuthenticationOptions.Value.LoginUrl, forceLoad: true); } else { diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Installer/InstallationNotes.md b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Installer/InstallationNotes.md new file mode 100644 index 0000000000..dc655f430f --- /dev/null +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Installer/InstallationNotes.md @@ -0,0 +1,13 @@ +# Installation Notes for Basic Theme Module (MVC) + +The Basic Theme is a theme implementation for the ASP.NET Core MVC / Razor Pages UI. It is a minimalist theme that doesn't add any styling on top of the plain [Bootstrap](https://getbootstrap.com/). You can take the Basic Theme as the base theme and build your own theme or styling on top of it. See the Customization section. + +The Basic Theme has RTL (Right-to-Left language) support. + +If you are looking for a professional, enterprise ready theme, you can check the [Lepton Theme](https://abp.io/themes), which is a part of the ABP. + +See the [Theming document](https://github.com/abpframework/abp/blob/rel-9.1/docs/en/framework/ui/mvc-razor-pages/theming.md) to learn about themes. + +## Documentation + +For detailed information and usage instructions, please visit the [Basic Theme documentation](https://abp.io/docs/latest/framework/ui/mvc-razor-pages/basic-theme). \ No newline at end of file diff --git a/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/InstallationNotes.md b/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/InstallationNotes.md new file mode 100644 index 0000000000..088628d830 --- /dev/null +++ b/modules/basic-theme/src/Volo.Abp.BasicTheme.Installer/InstallationNotes.md @@ -0,0 +1,7 @@ +# Installation Notes for Basic Theme Module (Blazor) + +The Basic Theme is a theme implementation for the Blazor UI. It is a minimalist theme that doesn't add any styling on top of the plain [Bootstrap](https://getbootstrap.com/). You can take the Basic Theme as the base theme and build your own theme or styling on top of it. See the Customization section. + +## Documentation + +For detailed information and usage instructions, please visit the [Blazor UI Basic Theme documentation](https://abp.io/docs/latest/framework/ui/blazor/basic-theme?UI=BlazorServer). \ No newline at end of file diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Installer/InstallationNotes.md b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Installer/InstallationNotes.md new file mode 100644 index 0000000000..dcd9293ef3 --- /dev/null +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Installer/InstallationNotes.md @@ -0,0 +1,16 @@ +# Installation Notes for Blob Storing Database Module + +It is typical to store file contents in an application and read these file contents on need. Not only files, but you may also need to save various types of large binary objects, a.k.a. [BLOBs](https://en.wikipedia.org/wiki/Binary_large_object), into a storage. For example, you may want to save user profile pictures. + +A BLOB is a typically byte array. There are various places to store a BLOB item; storing in the local file system, in a shared database or on the [Azure BLOB storage](https://azure.microsoft.com/en-us/products/storage/blobs/) can be options. + +The ABP provides an abstraction to work with BLOBs and provides some pre-built storage providers that you can easily integrate to. Having such an abstraction has some benefits; + +You can easily integrate to your favorite BLOB storage provides with a few lines of configuration. +You can then easily change your BLOB storage without changing your application code. +If you want to create reusable application modules, you don't need to make assumption about how the BLOBs are stored. +ABP BLOB Storage system is also compatible to other ABP features like multi-tenancy. + +## Documentation + +For detailed information and usage instructions, please visit the [BLOB Storing documentation](https://abp.io/docs/latest/framework/infrastructure/blob-storing). \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Installer/InstallationNotes.md b/modules/blogging/src/Volo.Blogging.Installer/InstallationNotes.md new file mode 100644 index 0000000000..9ef0de0d04 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Installer/InstallationNotes.md @@ -0,0 +1,28 @@ +# Installation Notes for Blogging Module + +The ABP Blogging module provides a simple blogging system for ABP applications. It allows you to create and manage blogs, posts, tags, and comments. The module includes both a public interface for readers and an admin interface for content management. + +Key features of the Blogging module: +- Multiple blog support +- Post management with rich text editing +- Commenting functionality +- Social media sharing +- Admin interface for content management + +## Required Configurations + +The Blogging module requires **permission** settings to be configured after installation. Ensure that the necessary roles have the appropriate access rights for managing blogs, posts, comments and others. + +### Update Database + +The Blogging module requires database migrations to be applied. Following installation, you must update the database to create the necessary tables. + +### Permissions + +Enable the following permissions for the roles that require access to the Blogging module: + +![Blogging Permissions](blogging-permissions.png) + +## Documentation + +For detailed information and usage instructions, please visit the [Blogging Module documentation](https://abp.io/docs/latest/Modules/Cms-Kit/Blogging). \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Installer/blogging-permissions.png b/modules/blogging/src/Volo.Blogging.Installer/blogging-permissions.png new file mode 100644 index 0000000000..733f3c668f Binary files /dev/null and b/modules/blogging/src/Volo.Blogging.Installer/blogging-permissions.png differ diff --git a/modules/cms-kit/src/Volo.CmsKit.Installer/InstallationNotes.md b/modules/cms-kit/src/Volo.CmsKit.Installer/InstallationNotes.md new file mode 100644 index 0000000000..1a037cf1e3 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Installer/InstallationNotes.md @@ -0,0 +1,48 @@ +# Installation Notes for CMS Kit Module + +The ABP CMS Kit module provides a set of reusable Content Management System (CMS) features for your ABP-based applications. It offers ready-to-use UI components and APIs for common content management requirements. + +This module is part of the ABP Framework and provides features like comments, ratings, tags, blogs, and more to help you build content-rich applications. + +## Required Configurations + +The CmsKit module requires **permission** settings to be configured after installation. Ensure that the necessary roles have the appropriate access rights for managing blogs, posts, comments and others. + +### Enable CmsKit + +To enable the CmsKit module, add the following line to the `GlobalFeatureConfigurator` class of your module: + +```csharp +public static void Configure() +{ + OneTimeRunner.Run(() => + { + /* You can configure (enable/disable) global features of the used modules here. + * Please refer to the documentation to learn more about the Global Features System: + * https://docs.abp.io/en/abp/latest/Global-Features + */ + + GlobalFeatureManager.Instance.Modules.CmsKit(cmsKit => + { + cmsKit.EnableAll(); + // or + // cmsKit.Tags.Enable(); + // cmsKit.Comments.Enable(); + }); + }); +} +``` + +### Database Migrations + +The CmsKit module requires database migrations to be applied. After enable **CmsKit**, Add a new migration and update the database to create the necessary tables. + +### Permissions + +Enable the following permissions for the roles that require access to the CmsKit module: + +![CmsKit Permissions](cmskit-permissions.png) + +## Documentation + +For detailed information and usage instructions, please visit the [CMS Kit documentation](https://abp.io/docs/latest/modules/cms-kit). \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Installer/cmskit-permissions.png b/modules/cms-kit/src/Volo.CmsKit.Installer/cmskit-permissions.png new file mode 100644 index 0000000000..a095dc8140 Binary files /dev/null and b/modules/cms-kit/src/Volo.CmsKit.Installer/cmskit-permissions.png differ diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs index fd2984a3b4..8132202717 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs @@ -79,11 +79,6 @@ public class CmsKitPublicWebModule : AbpModule options.DisableModule(CmsKitPublicRemoteServiceConsts.ModuleName); }); - Configure(options => - { - options.KeyPrefix = "CmsKit:"; - }); - if (GlobalFeatureManager.Instance.IsEnabled()) { Configure(options => diff --git a/modules/docs/Volo.Docs.abpmdl b/modules/docs/Volo.Docs.abpmdl index 17b5d6fab9..77c70bddf8 100644 --- a/modules/docs/Volo.Docs.abpmdl +++ b/modules/docs/Volo.Docs.abpmdl @@ -7,18 +7,6 @@ } }, "packages": { - "VoloDocs.Web": { - "path": "app/VoloDocs.Web/VoloDocs.Web.abppkg", - "folder": "app" - }, - "VoloDocs.EntityFrameworkCore": { - "path": "app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.abppkg", - "folder": "app" - }, - "VoloDocs.Migrator": { - "path": "app/VoloDocs.Migrator/VoloDocs.Migrator.abppkg", - "folder": "app" - }, "Volo.Docs.Web": { "path": "src/Volo.Docs.Web/Volo.Docs.Web.abppkg", "folder": "src" diff --git a/modules/docs/src/Volo.Docs.Installer/InstallationNotes.md b/modules/docs/src/Volo.Docs.Installer/InstallationNotes.md new file mode 100644 index 0000000000..a0c172d27c --- /dev/null +++ b/modules/docs/src/Volo.Docs.Installer/InstallationNotes.md @@ -0,0 +1,31 @@ +# Installation Notes for Docs Module + +The ABP Docs module provides a complete documentation system for ABP applications. It allows you to create, manage, and publish documentation from various sources like GitHub, GitLab, or local file system. The module includes both a public interface for readers and an admin interface for documentation management. + +Key features of the Docs module: +- Multiple documentation projects support +- Version control integration +- Markdown support +- Navigation generation +- Full-text search +- Multi-language support +- Admin interface for documentation management + + +## Required Configurations + +The Docs module requires **permission** settings to be configured after installation and database update. + +### Update Database + +The Docs module requires database migrations to be applied. Following installation, you must update the database to create the necessary tables. + +### Permissions + +Enable the following permissions for the roles that require access to the Docs module: + +![Docs Permissions](docs-permissions.png) + +## Documentation + +For detailed information and usage instructions, please visit the [Docs Module documentation](https://abp.io/docs/latest/Modules/Docs). \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Installer/docs-permissions.png b/modules/docs/src/Volo.Docs.Installer/docs-permissions.png new file mode 100644 index 0000000000..b3e478ce0a Binary files /dev/null and b/modules/docs/src/Volo.Docs.Installer/docs-permissions.png differ diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Installer/InstallationNotes.md b/modules/feature-management/src/Volo.Abp.FeatureManagement.Installer/InstallationNotes.md new file mode 100644 index 0000000000..10e1b121f6 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Installer/InstallationNotes.md @@ -0,0 +1,24 @@ +# Installation Notes for Feature Management Module + +The Feature Management module provides a way to define and manage features in an ABP application. Features are used to enable or disable specific functionalities of an application based on different conditions, such as tenant subscription levels or user preferences. + +Key capabilities of the Feature Management module: +- Define features with different value types (boolean, numeric, etc.) +- Group features by providers (tenant, edition, etc.) +- Manage feature values through a user interface +- Check feature status in your application code + +## NuGet Packages + +The following NuGet packages are required for the Feature Management module: +- `Volo.Abp.FeatureManagement.Application` +- `Volo.Abp.FeatureManagement.HttpApi` +- `Volo.Abp.FeatureManagement.EntityFrameworkCore` (for EF Core) +- `Volo.Abp.FeatureManagement.MongoDB` (for MongoDB) +- `Volo.Abp.FeatureManagement.Web` (for MVC UI) +- `Volo.Abp.FeatureManagement.Blazor.Server` (for Blazor Server UI) +- `Volo.Abp.FeatureManagement.Blazor.WebAssembly` (for Blazor WebAssembly UI) + +## Documentation + +For detailed information and usage instructions, please visit the [Feature Management Module documentation](https://abp.io/docs/latest/Modules/Feature-Management). \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityErrorCodes.cs b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityErrorCodes.cs index aedec65862..4710c62f90 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityErrorCodes.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityErrorCodes.cs @@ -12,4 +12,6 @@ public static class IdentityErrorCodes public const string CanNotChangeTwoFactor = "Volo.Abp.Identity:010008"; public const string YouCannotDelegateYourself = "Volo.Abp.Identity:010009"; public const string ClaimNameExist = "Volo.Abp.Identity:010021"; + public const string CanNotUpdateStaticClaimType = "Volo.Abp.Identity:010022"; + public const string CanNotDeleteStaticClaimType = "Volo.Abp.Identity:010023"; } diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ar.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ar.json index e898146bda..bfbd43a9d7 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ar.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ar.json @@ -77,6 +77,8 @@ "Volo.Abp.Identity:010008": "لا يجوز تغيير إعداد عاملين.", "Volo.Abp.Identity:010009": "لا يمكنك تفويض نفسك.", "Volo.Abp.Identity:010021": "الاسم {0} موجود بالفعل.", + "Volo.Abp.Identity:010022": "لا يمكن تحديث نوع المطابقة.", + "Volo.Abp.Identity:010023": "لا يمكن حذف نوع المطابقة.", "Identity.OrganizationUnit.MaxUserMembershipCount": "العدد الأقصى المسموح به لعضوية الوحدة التنظيمية للمستخدم", "ThisUserIsNotActiveMessage": "هذا المستخدم غير نشط.", "Permission:IdentityManagement": "إدارة الهوية", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json index e6e1fd4f40..deea27dd17 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/cs.json @@ -77,6 +77,8 @@ "Volo.Abp.Identity:010008": "Není povoleno měnit nastavení dvou faktorů.", "Volo.Abp.Identity:010009": "Nemůžete delegovat své vlastní oprávnění.", "Volo.Abp.Identity:010021": "Název '{0}' již existuje.", + "Volo.Abp.Identity:010022": "Nelze aktualizovat statický typ deklarace.", + "Volo.Abp.Identity:010023": "Nelze smazat statický typ deklarace.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Maximální povolený počet členů organizační jednotky pro uživatele", "ThisUserIsNotActiveMessage": "Tento uživatel není aktivní.", "Permission:IdentityManagement": "Správa identit", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/de.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/de.json index c633851683..5987f215d7 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/de.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/de.json @@ -77,6 +77,8 @@ "Volo.Abp.Identity:010008": "Die Zwei-Faktor-Einstellung dürfen nicht geändert werden.", "Volo.Abp.Identity:010009": "Sie können sich nicht selbst delegieren.", "Volo.Abp.Identity:010021": "Der Name existiert bereits {0}", + "Volo.Abp.Identity:010022": "Der Name kann nicht aktualisiert werden.", + "Volo.Abp.Identity:010023": "Der Name kann nicht gelöscht werden.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Maximal zulässige Anzahl an Mitgliedschaften in Organisationseinheiten für einen Benutzer", "ThisUserIsNotActiveMessage": "Dieser Benutzer ist nicht aktiv.", "Permission:IdentityManagement": "Identitätsverwaltung", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/el.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/el.json index fe9ac05d5a..b3b040cb91 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/el.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/el.json @@ -76,6 +76,8 @@ "Volo.Abp.Identity:010008": "Δεν επιτρέπεται η αλλαγή της ρύθμισης δύο παραγόντων.", "Volo.Abp.Identity:010009": "Δεν μπορείτε να αναθέσετε την εξουσιοδότησή σας σε εσάς ίδιο.", "Volo.Abp.Identity:010021": "Το όνομα '{0}' υπάρχει ήδη.", + "Volo.Abp.Identity:010022": "Δεν μπορείτε να ενημερώσετε ένα στατικό τύπο δήλωσης.", + "Volo.Abp.Identity:010023": "Δεν μπορείτε να διαγράψετε ένα στατικό τύπο δήλωσης.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Μέγιστος επιτρεπόμενος αριθμός μελών μονάδας οργανισμού για έναν χρήστη", "ThisUserIsNotActiveMessage": "Αυτός ο χρήστης δεν είναι ενεργός.", "Permission:IdentityManagement": "Διαχείριση ταυτότητας", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json index 915f0dd461..b7d30bb30a 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json @@ -76,6 +76,8 @@ "Volo.Abp.Identity:010008": "Changing the two factor setting is not allowed.", "Volo.Abp.Identity:010009": "You cannot delegate yourself!", "Volo.Abp.Identity:010021": "Name exist: '{0}'", + "Volo.Abp.Identity:010022": "Can not update a static ClaimType.", + "Volo.Abp.Identity:010023": "Can not delete a static ClaimType.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Maximum allowed organisation unit membership count for a user", "Permission:IdentityManagement": "Identity management", "Permission:RoleManagement": "Role management", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json index 97aafcdb8e..266ce50b5a 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json @@ -77,6 +77,8 @@ "Volo.Abp.Identity:010008": "It's not allowed to change two factor setting.", "Volo.Abp.Identity:010009": "You can not delegate yourself.", "Volo.Abp.Identity:010021": "Name exist: '{0}'.", + "Volo.Abp.Identity:010022": "Can not update a static ClaimType.", + "Volo.Abp.Identity:010023": "Can not delete a static ClaimType.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Maximum allowed organization unit membership count for a user", "ThisUserIsNotActiveMessage": "This user is not active.", "Permission:IdentityManagement": "Identity management", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/es.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/es.json index fb5edbc2ac..861ffe10b0 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/es.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/es.json @@ -77,6 +77,8 @@ "Volo.Abp.Identity:010008": "No está permitido cambiar la configuración de autenticación de dos pasos.", "Volo.Abp.Identity:010009": "No puedes delegar tu propia cuenta!", "Volo.Abp.Identity:010021": "Ya existe un con el nombre '{0}'", + "Volo.Abp.Identity:010022": "No se puede actualizar un tipo de reclamación estática.", + "Volo.Abp.Identity:010023": "No se puede borrar un tipo de reclamación estática.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Número máximo de unidades organizativas por usuario", "ThisUserIsNotActiveMessage": "Este usuario no está activo.", "Permission:IdentityManagement": "Gestión de identidades", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fa.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fa.json index 3482c2120e..b733dbd4eb 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fa.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fa.json @@ -77,6 +77,8 @@ "Volo.Abp.Identity:010008": "تغییر دادن تنظیمات دو مرحله ای مجاز نمی باشد.", "Volo.Abp.Identity:010009": "شما نمی توانید خودتان را معرفی کنید.", "Volo.Abp.Identity:010021": "نام {0} قبلاً استفاده گردیده است.", + "Volo.Abp.Identity:010022": "نمی توان نام نقش/وظیفه را تغییر داد.", + "Volo.Abp.Identity:010023": "نمی توان نقش/وظیفه را حذف کرد.", "Identity.OrganizationUnit.MaxUserMembershipCount": "حداکثر تعداد مجاز عضویت در یک واحد سازمان برای یک کاربر", "ThisUserIsNotActiveMessage": "این کاربر غیرفعال میباشد.", "Permission:IdentityManagement": "مدیریت هویت", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fi.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fi.json index cf3d33c34f..1ad2950b8e 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fi.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fi.json @@ -77,6 +77,8 @@ "Volo.Abp.Identity:010008": "Kahden tekijän asetusta ei saa muuttaa.", "Volo.Abp.Identity:010009": "Et voi delegoida itseäsi.", "Volo.Abp.Identity:010021": "{0} on jo olemassa.", + "Volo.Abp.Identity:010022": "Staattista väittämätunnusta ei voi päivittää.", + "Volo.Abp.Identity:010023": "Staattista väittämätunnusta ei voi poistaa.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Suurin sallittu organisaatioyksikön jäsenmäärä käyttäjälle", "ThisUserIsNotActiveMessage": "Tämä käyttäjä ei ole aktiivinen.", "Permission:IdentityManagement": "Identiteetin hallinta", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fr.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fr.json index d7c8788585..39c5a3a71d 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fr.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/fr.json @@ -77,6 +77,8 @@ "Volo.Abp.Identity:010008": "Il n’est pas permis de changer deux facteurs de réglage.", "Volo.Abp.Identity:010009": "Vous ne pouvez pas vous déléguer vous-même.", "Volo.Abp.Identity:010021" : "Le nom '{0}' existe déjà.", + "Volo.Abp.Identity:010022": "Vous ne pouvez pas modifier un type de revendication statique.", + "Volo.Abp.Identity:010023": "Vous ne pouvez pas supprimer un type de revendication statique.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Nombre maximal d’adhésions autorisées à l’unité d’organisation pour un utilisateur", "ThisUserIsNotActiveMessage": "Cet utilisateur n'est pas actif.", "Permission:IdentityManagement": "Gestion de l’identité", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hi.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hi.json index 0c945fc6bd..760ae275de 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hi.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hi.json @@ -77,6 +77,8 @@ "Volo.Abp.Identity:010008": "इसे दो कारक सेटिंग बदलने की अनुमति नहीं है।", "Volo.Abp.Identity:010009": "आप अपने आप को अधिकृत नहीं कर सकते हैं!", "Volo.Abp.Identity:010021" : "नाम '{0}' पहले से ही लिया गया है।", + "Volo.Abp.Identity:010022": "स्थैतिक भूमिकाओं का नाम नहीं बदला जा सकता है।", + "Volo.Abp.Identity:010023": "स्थैतिक भूमिकाओं को हटाया नहीं जा सकता।", "Identity.OrganizationUnit.MaxUserMembershipCount": "उपयोगकर्ता के लिए अधिकतम अनुमत संगठन इकाई सदस्यता गणना", "ThisUserIsNotActiveMessage": "यह उपयोगकर्ता सक्रिय नहीं है।", "Permission:IdentityManagement": "पहचान प्रबंधन", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hr.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hr.json index 92d4b74973..5af46488f3 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hr.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hr.json @@ -76,7 +76,9 @@ "Volo.Abp.Identity:010007": "Ne možete promijeniti postavku dva faktora.", "Volo.Abp.Identity:010008": "Nije dopušteno mijenjati postavke dvofaktorske autentifikacije.", "Volo.Abp.Identity:010009": "Ne možete delegirati sami sebi.", - "Volo.Abp.Identity:010021" : "Naziv '{0}' već postoji.", + "Volo.Abp.Identity:010021": "Naziv '{0}' već postoji.", + "Volo.Abp.Identity:010022": "Ne možete ažurirati statički tip deklaracije.", + "Volo.Abp.Identity:010023": "Ne možete izbrisati statički tip deklaracije.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Maksimalni dopušteni broj članstva u organizacijskoj jedinici za korisnika", "ThisUserIsNotActiveMessage": "Ovaj korisnik nije aktivan.", "Permission:IdentityManagement": "Upravljanje identitetom", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json index e65fdd805e..4c9ee448eb 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json @@ -76,7 +76,9 @@ "Volo.Abp.Identity:010007": "Nem változtathatja meg a kétlépcsős bejelentkezés beállítását.", "Volo.Abp.Identity:010008": "Kétlépcsős bejelentkezés beállítás megváltoztatása nem megengedett.", "Volo.Abp.Identity:010009": "Nem adhatja át a saját jogosultságait.", - "Volo.Abp.Identity:010021" : "'{0}' nevű már létezik.", + "Volo.Abp.Identity:010021": "'{0}' nevű már létezik.", + "Volo.Abp.Identity:010022": "Nem lehet frissíteni a statikus jogosultság típusát.", + "Volo.Abp.Identity:010023": "Nem lehet törölni a statikus jogosultság típusát.", "Identity.OrganizationUnit.MaxUserMembershipCount": "A maximálisan megengedett szervezeti egység tagsági szám egy felhasználó számára", "ThisUserIsNotActiveMessage": "Ez a felhasználó nem aktív.", "Permission:IdentityManagement": "Identitáskezelés", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/is.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/is.json index 38fa84db3d..013bce103e 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/is.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/is.json @@ -76,7 +76,9 @@ "Volo.Abp.Identity:010007": "Þú getur ekki breytt tveggja þátta stillingu þinni.", "Volo.Abp.Identity:010008": "Það er ekki leyfilegt að breyta tvíþátta stillingu.", "Volo.Abp.Identity:010009": "Þú getur ekki delegað þér sjálfum.", - "Volo.Abp.Identity:010021" : "Nafnið '{0}' er þegar í notkun.", + "Volo.Abp.Identity:010021": "Nafnið '{0}' er þegar í notkun.", + "Volo.Abp.Identity:010022": "Ekki er hægt að breyta static hlutverk.", + "Volo.Abp.Identity:010023": "Ekki er hægt að eyða static hlutverkum.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Hámarks leyfileg fjöldi aðildar að skipulagseiningu fyrir notanda", "ThisUserIsNotActiveMessage": "Þessi notandi er ekki virkur.", "Permission:IdentityManagement": "Auðkenninga umsjón", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/it.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/it.json index bf8eb97e59..00d5c139b9 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/it.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/it.json @@ -76,7 +76,9 @@ "Volo.Abp.Identity:010007": "Non puoi modificare l'impostazione dei due fattori.", "Volo.Abp.Identity:010008": "Non è consentito modificare l'impostazione a due fattori.", "Volo.Abp.Identity:010009": "Non puoi delegare te stesso.", - "Volo.Abp.Identity:010021" : "Il nome '{0}' è già in uso.", + "Volo.Abp.Identity:010021": "Il nome '{0}' è già in uso.", + "Volo.Abp.Identity:010022": "Non puoi modificare il tipo di richiesta statica.", + "Volo.Abp.Identity:010023": "Non puoi eliminare il tipo di richiesta statica.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Numero massimo consentito di membri dell'unità organizzativa per un utente", "ThisUserIsNotActiveMessage": "Questo utente non è attivo.", "Permission:IdentityManagement": "Gestione identità", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/nl.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/nl.json index 9a4928c4c0..f7fab35933 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/nl.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/nl.json @@ -76,7 +76,9 @@ "Volo.Abp.Identity:010007": "U kunt uw instelling voor tweefactor authenticatie niet wijzigen.", "Volo.Abp.Identity:010008": "Het is niet toegestaan om de instelling van tweefactor authenticatie te wijzigen.", "Volo.Abp.Identity:010009": "U kunt uzelf niet delegeren.", - "Volo.Abp.Identity:010021" : "Er bestaat al een met de naam '{0}'.", + "Volo.Abp.Identity:010021": "Er bestaat al een met de naam '{0}'.", + "Volo.Abp.Identity:010022": "Kan de naam van een statische claim niet wijzigen.", + "Volo.Abp.Identity:010023": "Kan de naam van een statische claim niet verwijderen.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Maximaal toegestande aantal lidmaatschappen van organisatie-eenheden voor een gebruiker", "ThisUserIsNotActiveMessage": "Deze gebruiker is niet actief.", "Permission:IdentityManagement": "Identiteitsbeheer", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pl-PL.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pl-PL.json index 6e2d4d1406..8d794777ee 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pl-PL.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pl-PL.json @@ -76,7 +76,9 @@ "Volo.Abp.Identity:010007": "Nie możesz zmienić ustawienia dwóch czynników.", "Volo.Abp.Identity:010008": "Nie wolno zmieniać ustawienia dwuczynnikowego.", "Volo.Abp.Identity:010009": "Nie możesz delegować swoich uprawnień.", - "Volo.Abp.Identity:010021" : "Nazwa '{0}' już istnieje.", + "Volo.Abp.Identity:010021": "Nazwa '{0}' już istnieje.", + "Volo.Abp.Identity:010022": "Nie można zmienić typu statycznej deklaracji.", + "Volo.Abp.Identity:010023": "Nie można usunąć typu statycznej deklaracji.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Maksymalna dozwolona liczba członków jednostki organizacyjnej dla użytkownika", "ThisUserIsNotActiveMessage": "Ten użytkownik nie jest aktywny.", "Permission:IdentityManagement": "Zarządzanie tożsamością", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pt-BR.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pt-BR.json index 54c4ee1a20..b8c4a0fdb7 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pt-BR.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/pt-BR.json @@ -76,7 +76,9 @@ "Volo.Abp.Identity:010007": "Você não pode alterar sua configuração de dois fatores.", "Volo.Abp.Identity:010008": "Não é permitido alterar a configuração de dois fatores.", "Volo.Abp.Identity:010009": "Você não pode delegar a si mesmo.", - "Volo.Abp.Identity:010021" : "Já existe um(a) {0} com o nome.", + "Volo.Abp.Identity:010021": "Já existe um(a) {0} com o nome.", + "Volo.Abp.Identity:010022": "Não é possível alterar o tipo de declaração estática.", + "Volo.Abp.Identity:010023": "Não é possível excluir o tipo de declaração estática.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Contagem máxima permitida de membros da unidade organizacional para um usuário", "ThisUserIsNotActiveMessage": "Este usuário não está ativo.", "Permission:IdentityManagement": "Acessos", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ro-RO.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ro-RO.json index 59e5db1aa7..2cde7af570 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ro-RO.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ro-RO.json @@ -76,7 +76,9 @@ "Volo.Abp.Identity:010007": "Nu vă puteţi schimba setările de autentificare în doi paşi.", "Volo.Abp.Identity:010008": "Nu este permisă modificarea setărilor autentificării în doi paşi.", "Volo.Abp.Identity:010009": "Nu vă puteţi delega singur.", - "Volo.Abp.Identity:010021" : "Numele '{0}' este deja luat.", + "Volo.Abp.Identity:010021": "Numele '{0}' este deja luat.", + "Volo.Abp.Identity:010022": "Nu poate fi schimbată tipul de declaraţie statică.", + "Volo.Abp.Identity:010023": "Nu poate fi ştersă declaraţia statică.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Numărul maxim de unităţi organizaţionale permise pentru un utilizator", "ThisUserIsNotActiveMessage": "Acest utilizator nu este activ.", "Permission:IdentityManagement": "Administrare identităţii", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ru.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ru.json index e9a89171d3..8345df27b8 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ru.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/ru.json @@ -76,7 +76,9 @@ "Volo.Abp.Identity:010007": "Вы не можете изменить настройку двух факторов.", "Volo.Abp.Identity:010008": "Изменение двухфакторной настройки не допускается.", "Volo.Abp.Identity:010009": "Вы не можете делегировать свои собственные права.", - "Volo.Abp.Identity:010021" : "Имя '{0}' уже существует.", + "Volo.Abp.Identity:010021": "Имя '{0}' уже существует.", + "Volo.Abp.Identity:010022": "Невозможно изменить тип статической декларации.", + "Volo.Abp.Identity:010023": "Невозможно удалить тип статической декларации.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Максимально допустимое количество членов организационного подразделения для пользователя", "ThisUserIsNotActiveMessage": "Этот пользователь не активен.", "Permission:IdentityManagement": "Управление идентификацией", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sk.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sk.json index 5ab18796c5..d9fa8dbf61 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sk.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sk.json @@ -76,7 +76,9 @@ "Volo.Abp.Identity:010007": "Dvojfaktorové nastavenie nie je možné zmeniť.", "Volo.Abp.Identity:010008": "Dvojfaktorové nastavenie nie je povolené zmeniť.", "Volo.Abp.Identity:010009": "Nemôžete delegovať svoje vlastné oprávnenia.", - "Volo.Abp.Identity:010021" : "Názov '{0}' sa už používa.", + "Volo.Abp.Identity:010021": "Názov '{0}' sa už používa.", + "Volo.Abp.Identity:010022": "Nie je možné zmeniť typ statického oprávnenia.", + "Volo.Abp.Identity:010023": "Nie je možné odstrániť typ statického oprávnenia.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Maximálny povolený počet členov organizačnej jednotky pre používateľa", "ThisUserIsNotActiveMessage": "Tento používateľ nie je aktívny.", "Permission:IdentityManagement": "Správa identít", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sl.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sl.json index be509eccf1..b6d505c1c3 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sl.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sl.json @@ -77,6 +77,8 @@ "Volo.Abp.Identity:010008": "Ni dovoljeno spreminjati nastavitve dveh faktorjev.", "Volo.Abp.Identity:010009": "Ne morete delegirati svojih pravic.", "Volo.Abp.Identity:010021" : "Naziv '{0}' že obstaja.", + "Volo.Abp.Identity:010022": "Ne morete spremeniti tipa statične deklaracije.", + "Volo.Abp.Identity:010023": "Ne morete izbrisati tipa statične deklaracije.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Največje dovoljeno število članov v organizacijski enoti za uporabnika", "ThisUserIsNotActiveMessage": "Ta uporabnik ni aktiven.", "Permission:IdentityManagement": "Upravljanje identitet", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sv.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sv.json index e8ebd083bf..e664adbbfe 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sv.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/sv.json @@ -77,6 +77,8 @@ "Volo.Abp.Identity:010008": "Det är inte tillåtet att ändra inställningen för två faktorer.", "Volo.Abp.Identity:010009": "Du kan inte delegera dig själv.", "Volo.Abp.Identity:010021": "Namn finns: '{0}'.", + "Volo.Abp.Identity:010022": "Kan inte ändra statiskt område.", + "Volo.Abp.Identity:010023": "Kan inte ta bort statiskt område.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Högsta tillåtna antal medlemskap i organisationsenheter för en användare", "ThisUserIsNotActiveMessage": "Den här användaren är inte aktiv.", "Permission:IdentityManagement": "Identitetshantering", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json index 813f62fabe..72b232de4e 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/tr.json @@ -76,7 +76,9 @@ "Volo.Abp.Identity:010007": "İki faktörlü ayarınızı değiştiremezsiniz.", "Volo.Abp.Identity:010008": "İki faktörlü ayarın değiştirilmesine izin verilmez.", "Volo.Abp.Identity:010009": "Kendinizi yetkilendiremezsiniz.", - "Volo.Abp.Identity:010021" : "{0} isminde bir birim zaten var.", + "Volo.Abp.Identity:010021": "{0} isminde bir birim zaten var.", + "Volo.Abp.Identity:010022": "Bir statik izin tipi değiştirilemez.", + "Volo.Abp.Identity:010023": "Bir statik izin tipi silinemez.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Bir kullanıcı için izin verilen en fazla organizasyon birimi sayısı", "ThisUserIsNotActiveMessage": "Bu kullanıcı aktif değil.", "Permission:IdentityManagement": "Kimlik yönetimi", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/vi.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/vi.json index 231b00db46..39f9940090 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/vi.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/vi.json @@ -77,6 +77,8 @@ "Volo.Abp.Identity:010008": "Không được phép thay đổi cài đặt hai yếu tố.", "Volo.Abp.Identity:010009": "Bạn không thể ủy quyền cho chính mình.", "Volo.Abp.Identity:010021": "Tên '{0}' đã tồn tại.", + "Volo.Abp.Identity:010022": "Không thể thay đổi kiểu của phát biểu tĩnh.", + "Volo.Abp.Identity:010023": "Không thể xóa phát biểu tĩnh.", "Identity.OrganizationUnit.MaxUserMembershipCount": "Số lượng thành viên đơn vị tổ chức tối đa được phép cho một người dùng", "ThisUserIsNotActiveMessage": "Người dùng này không hoạt động.", "Permission:IdentityManagement": "Quản lý danh tính", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json index 4ae5130994..cfbe6bd279 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json @@ -77,6 +77,8 @@ "Volo.Abp.Identity:010008": "不允许修改双因素身份验证设置。", "Volo.Abp.Identity:010009": "你不能委托给自己。", "Volo.Abp.Identity:010021": "名称:'{0}' 已存在", + "Volo.Abp.Identity:010022": "不能更改静态声明的类型。", + "Volo.Abp.Identity:010023": "不能删除静态声明的类型。", "Identity.OrganizationUnit.MaxUserMembershipCount": "组织单位最大允许的成员资格计数", "ThisUserIsNotActiveMessage": "该用户不可用。", "Permission:IdentityManagement": "身份标识管理", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hant.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hant.json index 0666df264d..b3899de248 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hant.json +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hant.json @@ -76,7 +76,9 @@ "Volo.Abp.Identity:010007": "你不能修改你的雙因素身份驗證設置", "Volo.Abp.Identity:010008": "不允許修改雙因素身份驗證設置.", "Volo.Abp.Identity:010009": "你不能委派給自己", - "Volo.Abp.Identity:010021" : "名稱 '{0}' 已存在.", + "Volo.Abp.Identity:010021": "名稱 '{0}' 已存在.", + "Volo.Abp.Identity:010022": "無法更改靜態宣告的類型.", + "Volo.Abp.Identity:010023": "無法刪除靜態宣告的類型.", "Identity.OrganizationUnit.MaxUserMembershipCount": "允許一個使用者至多可隸屬在幾個組織單位", "ThisUserIsNotActiveMessage": "該用戶不可用.", "Permission:IdentityManagement": "身份識別管理", diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimTypeManager.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimTypeManager.cs index bc8ab16d9f..f821f81d35 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimTypeManager.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaimTypeManager.cs @@ -35,12 +35,12 @@ public class IdentityClaimTypeManager : DomainService { if (await IdentityClaimTypeRepository.AnyAsync(claimType.Name, claimType.Id)) { - throw new AbpException($"Name Exist: {claimType.Name}"); + throw new BusinessException(IdentityErrorCodes.ClaimNameExist).WithData("0", claimType.Name); } if (claimType.IsStatic) { - throw new AbpException($"Can not update a static ClaimType."); + throw new BusinessException(IdentityErrorCodes.CanNotUpdateStaticClaimType); } return await IdentityClaimTypeRepository.UpdateAsync(claimType); @@ -51,7 +51,7 @@ public class IdentityClaimTypeManager : DomainService var claimType = await IdentityClaimTypeRepository.GetAsync(id); if (claimType.IsStatic) { - throw new AbpException($"Can not delete a static ClaimType."); + throw new BusinessException(IdentityErrorCodes.CanNotDeleteStaticClaimType); } //Remove claim of this type from all users and roles diff --git a/modules/identity/src/Volo.Abp.Identity.Installer/InstallationNotes.md b/modules/identity/src/Volo.Abp.Identity.Installer/InstallationNotes.md new file mode 100644 index 0000000000..09950e5bdb --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Installer/InstallationNotes.md @@ -0,0 +1,9 @@ +# Installation Notes for Identity Module + +The ABP Identity module provides user and role management functionality for your ABP-based applications. It is built on Microsoft's Identity library and extends it with additional features like organization units and claims management. + +This module is part of the ABP Framework and provides the core identity management capabilities needed by most business applications. + +## Documentation + +For detailed information and usage instructions, please visit the [Identity module documentation](https://abp.io/docs/latest/modules/identity). diff --git a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RolePermissionManagementProvider.cs b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RolePermissionManagementProvider.cs index b51110204a..e97d524cd7 100644 --- a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RolePermissionManagementProvider.cs +++ b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RolePermissionManagementProvider.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Domain.Repositories; using Volo.Abp.Guids; using Volo.Abp.Identity; using Volo.Abp.MultiTenancy; @@ -37,41 +38,44 @@ public class RolePermissionManagementProvider : PermissionManagementProvider public async override Task CheckAsync(string[] names, string providerName, string providerKey) { - var multiplePermissionValueProviderGrantInfo = new MultiplePermissionValueProviderGrantInfo(names); - var permissionGrants = new List(); - - if (providerName == Name) + using (PermissionGrantRepository.DisableTracking()) { - permissionGrants.AddRange(await PermissionGrantRepository.GetListAsync(names, providerName, providerKey)); + var multiplePermissionValueProviderGrantInfo = new MultiplePermissionValueProviderGrantInfo(names); + var permissionGrants = new List(); - } + if (providerName == Name) + { + permissionGrants.AddRange(await PermissionGrantRepository.GetListAsync(names, providerName, providerKey)); - if (providerName == UserPermissionValueProvider.ProviderName) - { - var userId = Guid.Parse(providerKey); - var roleNames = await UserRoleFinder.GetRoleNamesAsync(userId); + } - foreach (var roleName in roleNames) + if (providerName == UserPermissionValueProvider.ProviderName) { - permissionGrants.AddRange(await PermissionGrantRepository.GetListAsync(names, Name, roleName)); + var userId = Guid.Parse(providerKey); + var roleNames = await UserRoleFinder.GetRoleNamesAsync(userId); + + foreach (var roleName in roleNames) + { + permissionGrants.AddRange(await PermissionGrantRepository.GetListAsync(names, Name, roleName)); + } } - } - permissionGrants = permissionGrants.Distinct().ToList(); - if (!permissionGrants.Any()) - { - return multiplePermissionValueProviderGrantInfo; - } + permissionGrants = permissionGrants.Distinct().ToList(); + if (!permissionGrants.Any()) + { + return multiplePermissionValueProviderGrantInfo; + } - foreach (var permissionName in names) - { - var permissionGrant = permissionGrants.FirstOrDefault(x => x.Name == permissionName); - if (permissionGrant != null) + foreach (var permissionName in names) { - multiplePermissionValueProviderGrantInfo.Result[permissionName] = new PermissionValueProviderGrantInfo(true, permissionGrant.ProviderKey); + var permissionGrant = permissionGrants.FirstOrDefault(x => x.Name == permissionName); + if (permissionGrant != null) + { + multiplePermissionValueProviderGrantInfo.Result[permissionName] = new PermissionValueProviderGrantInfo(true, permissionGrant.ProviderKey); + } } - } - return multiplePermissionValueProviderGrantInfo; + return multiplePermissionValueProviderGrantInfo; + } } } diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityClaimTypeManager_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityClaimTypeManager_Tests.cs index 9078040910..04f4cc6eaa 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityClaimTypeManager_Tests.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityClaimTypeManager_Tests.cs @@ -53,7 +53,7 @@ public class IdentityClaimTypeManager_Tests : AbpIdentityDomainTestBase [Fact] public async Task Update_Name_Exist_Should_Exception() { - await Assert.ThrowsAnyAsync(async () => await _claimTypeManager.UpdateAsync( + await Assert.ThrowsAnyAsync(async () => await _claimTypeManager.UpdateAsync( new IdentityClaimType( Guid.NewGuid(), "Age"))); } @@ -65,6 +65,6 @@ public class IdentityClaimTypeManager_Tests : AbpIdentityDomainTestBase var phoneClaim = new IdentityClaimType(Guid.NewGuid(), "Phone", true, true); await _identityClaimTypeRepository.InsertAsync(phoneClaim); - await Assert.ThrowsAnyAsync(async () => await _claimTypeManager.UpdateAsync(phoneClaim)); + await Assert.ThrowsAnyAsync(async () => await _claimTypeManager.UpdateAsync(phoneClaim)); } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Installer/InstallationNotes.md b/modules/identityserver/src/Volo.Abp.IdentityServer.Installer/InstallationNotes.md new file mode 100644 index 0000000000..291c4f84b1 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Installer/InstallationNotes.md @@ -0,0 +1,9 @@ +# Installation Notes for Identity Server Module + +IdentityServer module provides a full integration with the [IdentityServer4](https://github.com/DuendeArchive/IdentityServer4) (IDS) framework, which provides advanced authentication features like single sign-on and API access control. This module persists clients, resources and other IDS-related objects to database. This module is replaced by [OpenIddict](https://abp.io/docs/latest/modules/openiddict) module after ABP v6.0 in the startup templates. + +> Note: You can not use IdentityServer and OpenIddict modules together. They are separate OpenID provider libraries for the same job. + +## Documentation + +For detailed information and usage instructions, please visit the [Identity Server Module documentation](https://abp.io/docs/latest/modules/identity-server). \ No newline at end of file diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/AbpOpenIddictOptions.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/AbpOpenIddictOptions.cs index 84149e9b0b..3339b6d376 100644 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/AbpOpenIddictOptions.cs +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/AbpOpenIddictOptions.cs @@ -20,4 +20,9 @@ public class AbpOpenIddictAspNetCoreOptions /// Attach auth server current culture info to response. /// public bool AttachCultureInfo { get; set; } = true; + + /// + /// Set the url of the select account page. + /// + public string SelectAccountPage { get; set; } = "~/Account/SelectAccount"; } diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/AuthorizeController.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/AuthorizeController.cs index f61d6fde45..b575a03c0e 100644 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/AuthorizeController.cs +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/AuthorizeController.cs @@ -2,12 +2,15 @@ using System.Collections.Generic; using System.Linq; using System.Security.Claims; +using System.Text.Encodings.Web; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; using OpenIddict.Abstractions; using OpenIddict.Server.AspNetCore; @@ -50,6 +53,24 @@ public class AuthorizeController : AbpOpenIdDictControllerBase }); } + // If prompt=select_account was specified by the client application, + // We will redirect the user to the select_account page. + if (request.HasPromptValue(OpenIddictConstants.PromptValues.SelectAccount)) + { + // To avoid endless login -> authorization redirects, the prompt=login flag + // is removed from the authorization request payload before redirecting the user. + var prompt = string.Join(" ", request.GetPromptValues().Remove(OpenIddictConstants.PromptValues.SelectAccount)); + + var parameters = Request.HasFormContentType ? + Request.Form.Where(parameter => parameter.Key != OpenIddictConstants.Parameters.Prompt).ToList() : + Request.Query.Where(parameter => parameter.Key != OpenIddictConstants.Parameters.Prompt).ToList(); + + parameters.Add(KeyValuePair.Create(OpenIddictConstants.Parameters.Prompt, new StringValues(prompt))); + + var selectAccountPath = HttpContext.RequestServices.GetRequiredService>().Value.SelectAccountPage; + return Redirect(Url.Content($"{selectAccountPath}?RedirectUri={UrlEncoder.Default.Encode(Request.PathBase + Request.Path + QueryString.Create(parameters))}")); + } + // Retrieve the user principal stored in the authentication cookie. // If a max_age parameter was provided, ensure that the cookie is not too old. // If the user principal can't be extracted or the cookie is too old, redirect the user to the login page. diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.Installer/InstallationNotes.md b/modules/openiddict/src/Volo.Abp.OpenIddict.Installer/InstallationNotes.md new file mode 100644 index 0000000000..a694798f5d --- /dev/null +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.Installer/InstallationNotes.md @@ -0,0 +1,16 @@ +# Installation Notes for OpenIddict Module + +The OpenIddict module is an authentication module for the ABP Framework that provides OAuth 2.0 and OpenID Connect server capabilities. It is built on the OpenIddict library and provides a complete solution for implementing authentication and authorization in your ABP applications. + +Key features of the OpenIddict module: +- OAuth 2.0 and OpenID Connect server implementation +- Token generation and validation +- Authorization code, implicit, client credentials, and resource owner password flows +- JWT and reference token support +- Client application management +- Scope management +- Integration with ABP's permission system + +## Documentation + +For detailed information and usage instructions, please visit the [OpenIddict Module documentation](https://abp.io/docs/latest/Modules/OpenIddict). \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs index ef056918c8..aa9bfe0029 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Application/Volo/Abp/PermissionManagement/PermissionAppService.cs @@ -43,25 +43,24 @@ public class PermissionAppService : ApplicationService, IPermissionAppService }; var multiTenancySide = CurrentTenant.GetMultiTenancySide(); + var permissionGroups = new List(); foreach (var group in await PermissionDefinitionManager.GetGroupsAsync()) { var groupDto = CreatePermissionGroupDto(group); - - var neededCheckPermissions = new List(); - var permissions = group.GetPermissionsWithChildren() .Where(x => x.IsEnabled) .Where(x => !x.Providers.Any() || x.Providers.Contains(providerName)) .Where(x => x.MultiTenancySide.HasFlag(multiTenancySide)); - + + var neededCheckPermissions = new List(); foreach (var permission in permissions) { - if(permission.Parent != null && !neededCheckPermissions.Contains(permission.Parent)) + if (permission.Parent != null && !neededCheckPermissions.Contains(permission.Parent)) { continue; } - + if (await SimpleStateCheckerManager.IsEnabledAsync(permission)) { neededCheckPermissions.Add(permission); @@ -73,42 +72,46 @@ public class PermissionAppService : ApplicationService, IPermissionAppService continue; } - var grantInfoDtos = neededCheckPermissions - .Select(CreatePermissionGrantInfoDto) - .ToList(); + groupDto.Permissions.AddRange(neededCheckPermissions.Select(CreatePermissionGrantInfoDto)); + permissionGroups.Add(groupDto); + } - var multipleGrantInfo = await PermissionManager.GetAsync(neededCheckPermissions.Select(x => x.Name).ToArray(), providerName, providerKey); + var multipleGrantInfo = await PermissionManager.GetAsync( + permissionGroups.SelectMany(group => group.Permissions).Select(permission => permission.Name).ToArray(), + providerName, + providerKey); - foreach (var grantInfo in multipleGrantInfo.Result) + foreach (var permissionGroup in permissionGroups) + { + foreach (var permission in permissionGroup.Permissions) { - var grantInfoDto = grantInfoDtos.First(x => x.Name == grantInfo.Name); - - grantInfoDto.IsGranted = grantInfo.IsGranted; - - foreach (var provider in grantInfo.Providers) + var grantInfo = multipleGrantInfo.Result.FirstOrDefault(x => x.Name == permission.Name); + if (grantInfo == null) { - grantInfoDto.GrantedProviders.Add(new ProviderInfoDto - { - ProviderName = provider.Name, - ProviderKey = provider.Key, - }); + continue; } - groupDto.Permissions.Add(grantInfoDto); + permission.IsGranted = grantInfo.IsGranted; + permission.GrantedProviders = grantInfo.Providers.Select(x => new ProviderInfoDto + { + ProviderName = x.Name, + ProviderKey = x.Key, + }).ToList(); } - if (groupDto.Permissions.Any()) + if (permissionGroup.Permissions.Any()) { - result.Groups.Add(groupDto); + result.Groups.Add(permissionGroup); } } return result; } - private PermissionGrantInfoDto CreatePermissionGrantInfoDto(PermissionDefinition permission) + protected virtual PermissionGrantInfoDto CreatePermissionGrantInfoDto(PermissionDefinition permission) { - return new PermissionGrantInfoDto { + return new PermissionGrantInfoDto + { Name = permission.Name, DisplayName = permission.DisplayName?.Localize(StringLocalizerFactory), ParentName = permission.Parent?.Name, @@ -117,10 +120,10 @@ public class PermissionAppService : ApplicationService, IPermissionAppService }; } - private PermissionGroupDto CreatePermissionGroupDto(PermissionGroupDefinition group) + protected virtual PermissionGroupDto CreatePermissionGroupDto(PermissionGroupDefinition group) { var localizableDisplayName = group.DisplayName as LocalizableString; - + return new PermissionGroupDto { Name = group.Name, diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeeder.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeeder.cs index 1e8a4aab7b..de2b824412 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeeder.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeeder.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories; using Volo.Abp.Guids; using Volo.Abp.MultiTenancy; @@ -33,14 +34,17 @@ public class PermissionDataSeeder : IPermissionDataSeeder, ITransientDependency { using (CurrentTenant.Change(tenantId)) { - var names = grantedPermissions.ToArray(); - var existsPermissionGrants = (await PermissionGrantRepository.GetListAsync(names, providerName, providerKey)).Select(x => x.Name).ToList(); - var permissions = names.Except(existsPermissionGrants).Select(permissionName => new PermissionGrant(GuidGenerator.Create(), permissionName, providerName, providerKey, tenantId)).ToList(); - if (!permissions.Any()) + using (PermissionGrantRepository.DisableTracking()) { - return; + var names = grantedPermissions.ToArray(); + var existsPermissionGrants = (await PermissionGrantRepository.GetListAsync(names, providerName, providerKey)).Select(x => x.Name).ToList(); + var permissions = names.Except(existsPermissionGrants).Select(permissionName => new PermissionGrant(GuidGenerator.Create(), permissionName, providerName, providerKey, tenantId)).ToList(); + if (!permissions.Any()) + { + return; + } + await PermissionGrantRepository.InsertManyAsync(permissions); } - await PermissionGrantRepository.InsertManyAsync(permissions); } } } diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManagementProvider.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManagementProvider.cs index 0a80ed53e5..b6dfc2e518 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManagementProvider.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManagementProvider.cs @@ -1,5 +1,6 @@ using System.Linq; using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; using Volo.Abp.Guids; using Volo.Abp.MultiTenancy; @@ -34,21 +35,24 @@ public abstract class PermissionManagementProvider : IPermissionManagementProvid public virtual async Task CheckAsync(string[] names, string providerName, string providerKey) { - var multiplePermissionValueProviderGrantInfo = new MultiplePermissionValueProviderGrantInfo(names); - if (providerName != Name) + using (PermissionGrantRepository.DisableTracking()) { - return multiplePermissionValueProviderGrantInfo; - } + var multiplePermissionValueProviderGrantInfo = new MultiplePermissionValueProviderGrantInfo(names); + if (providerName != Name) + { + return multiplePermissionValueProviderGrantInfo; + } - var permissionGrants = await PermissionGrantRepository.GetListAsync(names, providerName, providerKey); + var permissionGrants = await PermissionGrantRepository.GetListAsync(names, providerName, providerKey); - foreach (var permissionName in names) - { - var isGrant = permissionGrants.Any(x => x.Name == permissionName); - multiplePermissionValueProviderGrantInfo.Result[permissionName] = new PermissionValueProviderGrantInfo(isGrant, providerKey); - } + foreach (var permissionName in names) + { + var isGrant = permissionGrants.Any(x => x.Name == permissionName); + multiplePermissionValueProviderGrantInfo.Result[permissionName] = new PermissionValueProviderGrantInfo(isGrant, providerKey); + } - return multiplePermissionValueProviderGrantInfo; + return multiplePermissionValueProviderGrantInfo; + } } public virtual Task SetAsync(string name, string providerKey, bool isGranted) diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionStore.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionStore.cs index 6eed394a31..85ffd77924 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionStore.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionStore.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Authorization.Permissions; using Volo.Abp.Caching; using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories; namespace Volo.Abp.PermissionManagement; @@ -67,36 +68,39 @@ public class PermissionStore : IPermissionStore, ITransientDependency string currentName, PermissionGrantCacheItem currentCacheItem) { - var permissions = await PermissionDefinitionManager.GetPermissionsAsync(); + using (PermissionGrantRepository.DisableTracking()) + { + var permissions = await PermissionDefinitionManager.GetPermissionsAsync(); - Logger.LogDebug($"Getting all granted permissions from the repository for this provider name,key: {providerName},{providerKey}"); + Logger.LogDebug($"Getting all granted permissions from the repository for this provider name,key: {providerName},{providerKey}"); - var grantedPermissionsHashSet = new HashSet( - (await PermissionGrantRepository.GetListAsync(providerName, providerKey)).Select(p => p.Name) - ); + var grantedPermissionsHashSet = new HashSet( + (await PermissionGrantRepository.GetListAsync(providerName, providerKey)).Select(p => p.Name) + ); - Logger.LogDebug($"Setting the cache items. Count: {permissions.Count}"); + Logger.LogDebug($"Setting the cache items. Count: {permissions.Count}"); - var cacheItems = new List>(); + var cacheItems = new List>(); - foreach (var permission in permissions) - { - var isGranted = grantedPermissionsHashSet.Contains(permission.Name); + foreach (var permission in permissions) + { + var isGranted = grantedPermissionsHashSet.Contains(permission.Name); - cacheItems.Add(new KeyValuePair( - CalculateCacheKey(permission.Name, providerName, providerKey), - new PermissionGrantCacheItem(isGranted)) - ); + cacheItems.Add(new KeyValuePair( + CalculateCacheKey(permission.Name, providerName, providerKey), + new PermissionGrantCacheItem(isGranted)) + ); - if (permission.Name == currentName) - { - currentCacheItem.IsGranted = isGranted; + if (permission.Name == currentName) + { + currentCacheItem.IsGranted = isGranted; + } } - } - await Cache.SetManyAsync(cacheItems); + await Cache.SetManyAsync(cacheItems); - Logger.LogDebug($"Finished setting the cache items. Count: {permissions.Count}"); + Logger.LogDebug($"Finished setting the cache items. Count: {permissions.Count}"); + } } public virtual async Task IsGrantedAsync(string[] names, string providerName, string providerKey) @@ -169,34 +173,37 @@ public class PermissionStore : IPermissionStore, ITransientDependency string providerKey, List notCacheKeys) { - var permissions = (await PermissionDefinitionManager.GetPermissionsAsync()) - .Where(x => notCacheKeys.Any(k => GetPermissionNameFormCacheKeyOrNull(k) == x.Name)).ToList(); + using (PermissionGrantRepository.DisableTracking()) + { + var permissions = (await PermissionDefinitionManager.GetPermissionsAsync()) + .Where(x => notCacheKeys.Any(k => GetPermissionNameFormCacheKeyOrNull(k) == x.Name)).ToList(); - Logger.LogDebug($"Getting not cache granted permissions from the repository for this provider name,key: {providerName},{providerKey}"); + Logger.LogDebug($"Getting not cache granted permissions from the repository for this provider name,key: {providerName},{providerKey}"); - var grantedPermissionsHashSet = new HashSet( - (await PermissionGrantRepository.GetListAsync(notCacheKeys.Select(GetPermissionNameFormCacheKeyOrNull).ToArray(), providerName, providerKey)).Select(p => p.Name) - ); + var grantedPermissionsHashSet = new HashSet( + (await PermissionGrantRepository.GetListAsync(notCacheKeys.Select(GetPermissionNameFormCacheKeyOrNull).ToArray(), providerName, providerKey)).Select(p => p.Name) + ); - Logger.LogDebug($"Setting the cache items. Count: {permissions.Count}"); + Logger.LogDebug($"Setting the cache items. Count: {permissions.Count}"); - var cacheItems = new List>(); + var cacheItems = new List>(); - foreach (var permission in permissions) - { - var isGranted = grantedPermissionsHashSet.Contains(permission.Name); + foreach (var permission in permissions) + { + var isGranted = grantedPermissionsHashSet.Contains(permission.Name); - cacheItems.Add(new KeyValuePair( - CalculateCacheKey(permission.Name, providerName, providerKey), - new PermissionGrantCacheItem(isGranted)) - ); - } + cacheItems.Add(new KeyValuePair( + CalculateCacheKey(permission.Name, providerName, providerKey), + new PermissionGrantCacheItem(isGranted)) + ); + } - await Cache.SetManyAsync(cacheItems); + await Cache.SetManyAsync(cacheItems); - Logger.LogDebug($"Finished setting the cache items. Count: {permissions.Count}"); + Logger.LogDebug($"Finished setting the cache items. Count: {permissions.Count}"); - return cacheItems; + return cacheItems; + } } protected virtual string CalculateCacheKey(string name, string providerName, string providerKey) diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Installer/InstallationNotes.md b/modules/permission-management/src/Volo.Abp.PermissionManagement.Installer/InstallationNotes.md new file mode 100644 index 0000000000..452dfc1a4c --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Installer/InstallationNotes.md @@ -0,0 +1,9 @@ +# Installation Notes for Permission Management Module + +The ABP Permission Management module provides infrastructure to persist and manage permissions in your ABP-based applications. It allows you to grant permissions to users, roles, or other entities. + +This module is part of the ABP Framework and provides the core permission management functionality needed by most business applications. + +## Documentation + +For detailed information and usage instructions, please visit the [Permission Management module documentation](https://abp.io/docs/latest/modules/permission-management). \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Installer/InstallationNotes.md b/modules/setting-management/src/Volo.Abp.SettingManagement.Installer/InstallationNotes.md new file mode 100644 index 0000000000..dd675ae5ec --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Installer/InstallationNotes.md @@ -0,0 +1,15 @@ +# Installation Notes for Setting Management Module + +The Setting Management module provides a way to store and manage settings in an ABP application. Settings are used to store application, tenant, or user-specific configuration values that can be changed at runtime. The module includes both a UI for setting management and an API for programmatic setting management. + +Key features of the Setting Management module: +- Store and retrieve settings +- Multi-level setting management (global, tenant, user) +- Setting management UI +- Extensible setting provider system +- Multi-tenancy support +- Integration with other ABP modules + +## Documentation + +For detailed information and usage instructions, please visit the [Setting Management Module documentation](https://abp.io/docs/latest/Modules/Setting-Management). \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Installer/InstallationNotes.md b/modules/tenant-management/src/Volo.Abp.TenantManagement.Installer/InstallationNotes.md new file mode 100644 index 0000000000..3a4dcd4fc6 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Installer/InstallationNotes.md @@ -0,0 +1,9 @@ +# Installation Notes for Tenant Management Module + +The ABP Tenant Management module provides multi-tenancy features for your ABP-based applications. It implements the `ITenantStore` interface and provides UI to manage tenants and their features. + +This module is part of the ABP Framework and provides the core functionality needed to build multi-tenant (SaaS) applications. + +## Documentation + +For detailed information and usage instructions, please visit the [Tenant Management module documentation](https://abp.io/docs/latest/modules/tenant-management). \ No newline at end of file diff --git a/modules/virtual-file-explorer/.abpstudio/state.json b/modules/virtual-file-explorer/.abpstudio/state.json new file mode 100644 index 0000000000..b0ef88d2f2 --- /dev/null +++ b/modules/virtual-file-explorer/.abpstudio/state.json @@ -0,0 +1,11 @@ +{ + "selectedKubernetesProfile": null, + "solutionRunner": { + "selectedProfile": null, + "targetFrameworks": [], + "applicationsStartingWithoutBuild": [], + "applicationsWithoutAutoRefreshBrowserOnRestart": [], + "applicationBatchStartStates": [], + "folderBatchStartStates": [] + } +} \ No newline at end of file diff --git a/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpmdl b/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpmdl index 3c025e6ade..d5210d1e6b 100644 --- a/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpmdl +++ b/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpmdl @@ -7,9 +7,13 @@ }, "packages": { "Volo.Abp.VirtualFileExplorer.DemoApp": { - "path": "app/Volo.Abp.VirtualFileExplorer.DemoApp/Volo.Abp.VirtualFileExplorer.DemoApp.abppkg", + "path": "app/DemoApp.abppkg", "folder": "app" }, + "Volo.Abp.VirtualFileExplorer.Contracts": { + "path": "src/Volo.Abp.VirtualFileExplorer.Contracts/Volo.Abp.VirtualFileExplorer.Contracts.abppkg", + "folder": "src" + }, "Volo.Abp.VirtualFileExplorer.Web": { "path": "src/Volo.Abp.VirtualFileExplorer.Web/Volo.Abp.VirtualFileExplorer.Web.abppkg", "folder": "src" diff --git a/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpsln b/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpsln index 264a302af3..73a99eb6c5 100644 --- a/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpsln +++ b/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpsln @@ -3,5 +3,6 @@ "Volo.Abp.VirtualFileExplorer": { "path": "Volo.Abp.VirtualFileExplorer.abpmdl" } - } + }, + "id": "d900c5b2-d907-4abb-bc38-b72f80006fe0" } \ No newline at end of file diff --git a/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.sln b/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.sln index 67b9741932..da8e8f67d4 100644 --- a/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.sln +++ b/modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.sln @@ -9,10 +9,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.VirtualFileExplore EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "app", "app", "{0489DA85-A27F-4D98-9DBD-950F5F2ECD11}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.VirtualFileExplorer.DemoApp", "app\Volo.Abp.VirtualFileExplorer.DemoApp\Volo.Abp.VirtualFileExplorer.DemoApp.csproj", "{6DAA2A8D-5422-4C3B-BA70-B54D949B1678}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.VirtualFileExplorer.Installer", "src\Volo.Abp.VirtualFileExplorer.Installer\Volo.Abp.VirtualFileExplorer.Installer.csproj", "{638DDC11-0B86-4B5D-A518-4A8158665074}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.VirtualFileExplorer.Contracts", "src\Volo.Abp.VirtualFileExplorer.Contracts\Volo.Abp.VirtualFileExplorer.Contracts.csproj", "{21FC5247-29FF-4D02-BB6A-8A739AC5640D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoApp", "app\DemoApp.csproj", "{C447E4F2-7FCA-49B6-8249-7E04C9E26BAD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -23,22 +25,27 @@ Global {3B7B6317-1B85-4164-8E11-75574F80AE17}.Debug|Any CPU.Build.0 = Debug|Any CPU {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.ActiveCfg = Release|Any CPU {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.Build.0 = Release|Any CPU - {6DAA2A8D-5422-4C3B-BA70-B54D949B1678}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6DAA2A8D-5422-4C3B-BA70-B54D949B1678}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6DAA2A8D-5422-4C3B-BA70-B54D949B1678}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6DAA2A8D-5422-4C3B-BA70-B54D949B1678}.Release|Any CPU.Build.0 = Release|Any CPU {638DDC11-0B86-4B5D-A518-4A8158665074}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {638DDC11-0B86-4B5D-A518-4A8158665074}.Debug|Any CPU.Build.0 = Debug|Any CPU {638DDC11-0B86-4B5D-A518-4A8158665074}.Release|Any CPU.ActiveCfg = Release|Any CPU {638DDC11-0B86-4B5D-A518-4A8158665074}.Release|Any CPU.Build.0 = Release|Any CPU + {21FC5247-29FF-4D02-BB6A-8A739AC5640D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {21FC5247-29FF-4D02-BB6A-8A739AC5640D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {21FC5247-29FF-4D02-BB6A-8A739AC5640D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {21FC5247-29FF-4D02-BB6A-8A739AC5640D}.Release|Any CPU.Build.0 = Release|Any CPU + {C447E4F2-7FCA-49B6-8249-7E04C9E26BAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C447E4F2-7FCA-49B6-8249-7E04C9E26BAD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C447E4F2-7FCA-49B6-8249-7E04C9E26BAD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C447E4F2-7FCA-49B6-8249-7E04C9E26BAD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {3B7B6317-1B85-4164-8E11-75574F80AE17} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} - {6DAA2A8D-5422-4C3B-BA70-B54D949B1678} = {0489DA85-A27F-4D98-9DBD-950F5F2ECD11} {638DDC11-0B86-4B5D-A518-4A8158665074} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {21FC5247-29FF-4D02-BB6A-8A739AC5640D} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {C447E4F2-7FCA-49B6-8249-7E04C9E26BAD} = {0489DA85-A27F-4D98-9DBD-950F5F2ECD11} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD} diff --git a/modules/virtual-file-explorer/app/Data/DemoAppDbContext.cs b/modules/virtual-file-explorer/app/Data/DemoAppDbContext.cs new file mode 100644 index 0000000000..ee3ec23421 --- /dev/null +++ b/modules/virtual-file-explorer/app/Data/DemoAppDbContext.cs @@ -0,0 +1,22 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Identity.EntityFrameworkCore; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; + +namespace DemoApp.Data; + +public class DemoAppDbContext : AbpDbContext +{ + public DemoAppDbContext(DbContextOptions options) + : base(options) + { + } + + protected override void OnModelCreating(ModelBuilder builder) + { + base.OnModelCreating(builder); + + builder.ConfigurePermissionManagement(); + builder.ConfigureIdentity(); + } +} diff --git a/modules/virtual-file-explorer/app/Data/DemoAppDbContextFactory.cs b/modules/virtual-file-explorer/app/Data/DemoAppDbContextFactory.cs new file mode 100644 index 0000000000..1f0d7e56c4 --- /dev/null +++ b/modules/virtual-file-explorer/app/Data/DemoAppDbContextFactory.cs @@ -0,0 +1,26 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; + +namespace DemoApp.Data; + +public class DemoAppDbContextFactory : IDesignTimeDbContextFactory +{ + public DemoAppDbContext CreateDbContext(string[] args) + { + var configuration = BuildConfiguration(); + + var builder = new DbContextOptionsBuilder() + .UseSqlServer(configuration.GetConnectionString("Default")); + + return new DemoAppDbContext(builder.Options); + } + + private static IConfigurationRoot BuildConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Directory.GetCurrentDirectory()) + .AddJsonFile("appsettings.json", optional: false); + + return builder.Build(); + } +} diff --git a/modules/virtual-file-explorer/app/DemoApp.abppkg b/modules/virtual-file-explorer/app/DemoApp.abppkg new file mode 100644 index 0000000000..48875c29cf --- /dev/null +++ b/modules/virtual-file-explorer/app/DemoApp.abppkg @@ -0,0 +1,3 @@ +{ + "role": "host.mvc" +} \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/DemoApp.csproj b/modules/virtual-file-explorer/app/DemoApp.csproj new file mode 100644 index 0000000000..938e3f03b1 --- /dev/null +++ b/modules/virtual-file-explorer/app/DemoApp.csproj @@ -0,0 +1,64 @@ + + + net9.0 + enable + enable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers + compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native + + + + + + Always + + + Always + + + + diff --git a/modules/virtual-file-explorer/app/DemoAppModule.cs b/modules/virtual-file-explorer/app/DemoAppModule.cs new file mode 100644 index 0000000000..ae03d3f2ed --- /dev/null +++ b/modules/virtual-file-explorer/app/DemoAppModule.cs @@ -0,0 +1,134 @@ +using DemoApp.Data; +using Microsoft.EntityFrameworkCore; +using Volo.Abp; +using Volo.Abp.Account; +using Volo.Abp.Account.Web; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; +using Volo.Abp.AspNetCore.Serilog; +using Volo.Abp.Autofac; +using Volo.Abp.AutoMapper; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.SqlServer; +using Volo.Abp.Identity; +using Volo.Abp.Identity.EntityFrameworkCore; +using Volo.Abp.Identity.Web; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Volo.Abp.MultiTenancy; +using Volo.Abp.PermissionManagement; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.PermissionManagement.HttpApi; +using Volo.Abp.PermissionManagement.Identity; +using Volo.Abp.PermissionManagement.Web; +using Volo.Abp.Swashbuckle; +using Volo.Abp.VirtualFileExplorer.Web; + +namespace DemoApp; + +[DependsOn( + // ABP Framework packages + typeof(AbpAspNetCoreMvcModule), + typeof(AbpAutofacModule), + typeof(AbpAutoMapperModule), + typeof(AbpSwashbuckleModule), + typeof(AbpAspNetCoreSerilogModule), + + // basic-theme + typeof(AbpAspNetCoreMvcUiBasicThemeModule), + + // VirtualFileExplorer module packages + typeof(AbpVirtualFileExplorerWebModule), + + // Account module packages + typeof(AbpAccountWebModule), + typeof(AbpAccountHttpApiModule), + typeof(AbpAccountApplicationModule), + + // Identity module packages + typeof(AbpPermissionManagementDomainIdentityModule), + typeof(AbpIdentityWebModule), + typeof(AbpIdentityHttpApiModule), + typeof(AbpIdentityApplicationModule), + typeof(AbpIdentityEntityFrameworkCoreModule), + + // Permission Management module packages + typeof(AbpPermissionManagementWebModule), + typeof(AbpPermissionManagementApplicationModule), + typeof(AbpPermissionManagementHttpApiModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreSqlServerModule) +)] +public class DemoAppModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.SaveStaticPermissionsToDatabase = false; + }); + + Configure(options => + { + options.IsEnabled = true; + }); + + Configure(options => + { + options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); + options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); + }); + + context.Services.AddAbpDbContext(options => + { + options.AddDefaultRepositories(includeAllEntities: true); + }); + + Configure(options => + { + options.Configure(configurationContext => + { + configurationContext.UseSqlServer(); + }); + }); + } + + public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context) + { + await context.ServiceProvider + .GetRequiredService() + .Database + .MigrateAsync(); + + await context.ServiceProvider + .GetRequiredService() + .SeedAsync(); + + var app = context.GetApplicationBuilder(); + var env = context.GetEnvironment(); + + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseAbpRequestLocalization(); + + if (!env.IsDevelopment()) + { + app.UseErrorPage(); + } + + app.MapAbpStaticAssets(); + + app.UseRouting(); + app.UseUnitOfWork(); + app.UseAuthentication(); + app.UseMultiTenancy(); + app.UseAuthorization(); + app.UseConfiguredEndpoints(); + } +} diff --git a/modules/virtual-file-explorer/app/Directory.Packages.props b/modules/virtual-file-explorer/app/Directory.Packages.props new file mode 100644 index 0000000000..c416fb784b --- /dev/null +++ b/modules/virtual-file-explorer/app/Directory.Packages.props @@ -0,0 +1,5 @@ + + + false + + \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.Designer.cs b/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.Designer.cs new file mode 100644 index 0000000000..016aade1a7 --- /dev/null +++ b/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.Designer.cs @@ -0,0 +1,985 @@ +// +using System; +using DemoApp.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace DemoApp.Migrations +{ + [DbContext(typeof(DemoAppDbContext))] + [Migration("20250315060727_Initial")] + partial class Initial + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "9.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("bit") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("bit") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("bit") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("LastAccessed") + .HasColumnType("datetime2"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("bit") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetimeoffset"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("bit"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("nvarchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("bit"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[TenantId] IS NOT NULL"); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.cs b/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.cs new file mode 100644 index 0000000000..1fc66a9503 --- /dev/null +++ b/modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.cs @@ -0,0 +1,606 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace DemoApp.Migrations +{ + /// + public partial class Initial : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpClaimTypes", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Required = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + Regex = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + RegexDescription = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + Description = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "int", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpLinkUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SourceUserId = table.Column(type: "uniqueidentifier", nullable: false), + SourceTenantId = table.Column(type: "uniqueidentifier", nullable: true), + TargetUserId = table.Column(type: "uniqueidentifier", nullable: false), + TargetTenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnits", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ParentId = table.Column(type: "uniqueidentifier", nullable: true), + Code = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: false), + DisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + EntityVersion = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); + table.ForeignKey( + name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", + column: x => x.ParentId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissionGrants", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissionGroups", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + DisplayName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissionGroups", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpPermissions", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + GroupName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + ParentName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + DisplayName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsEnabled = table.Column(type: "bit", nullable: false), + MultiTenancySide = table.Column(type: "tinyint", nullable: false), + Providers = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), + StateCheckers = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpPermissions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpRoles", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsDefault = table.Column(type: "bit", nullable: false), + IsStatic = table.Column(type: "bit", nullable: false), + IsPublic = table.Column(type: "bit", nullable: false), + EntityVersion = table.Column(type: "int", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSecurityLogs", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Identity = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + Action = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + TenantName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpSessions", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SessionId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Device = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + DeviceInfo = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IpAddresses = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), + SignedIn = table.Column(type: "datetime2", nullable: false), + LastAccessed = table.Column(type: "datetime2", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpSessions", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpUserDelegations", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + SourceUserId = table.Column(type: "uniqueidentifier", nullable: false), + TargetUserId = table.Column(type: "uniqueidentifier", nullable: false), + StartTime = table.Column(type: "datetime2", nullable: false), + EndTime = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserDelegations", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpUsers", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Surname = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + EmailConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + PasswordHash = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + SecurityStamp = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + IsExternal = table.Column(type: "bit", nullable: false, defaultValue: false), + PhoneNumber = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), + IsActive = table.Column(type: "bit", nullable: false), + TwoFactorEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), + LockoutEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), + AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), + ShouldChangePasswordOnNextLogin = table.Column(type: "bit", nullable: false), + EntityVersion = table.Column(type: "int", nullable: false), + LastPasswordChangeTime = table.Column(type: "datetimeoffset", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AbpOrganizationUnitRoles", + columns: table => new + { + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpRoleClaims", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpRoleClaims_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserClaims", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + UserId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AbpUserClaims_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserLogins", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ProviderKey = table.Column(type: "nvarchar(196)", maxLength: 196, nullable: false), + ProviderDisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); + table.ForeignKey( + name: "FK_AbpUserLogins_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserOrganizationUnits", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId", + column: x => x.OrganizationUnitId, + principalTable: "AbpOrganizationUnits", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserRoles", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + RoleId = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpRoles_RoleId", + column: x => x.RoleId, + principalTable: "AbpRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AbpUserRoles_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AbpUserTokens", + columns: table => new + { + UserId = table.Column(type: "uniqueidentifier", nullable: false), + LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Value = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AbpUserTokens_AbpUsers_UserId", + column: x => x.UserId, + principalTable: "AbpUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", + table: "AbpLinkUsers", + columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, + unique: true, + filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", + table: "AbpOrganizationUnitRoles", + columns: new[] { "RoleId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_Code", + table: "AbpOrganizationUnits", + column: "Code"); + + migrationBuilder.CreateIndex( + name: "IX_AbpOrganizationUnits_ParentId", + table: "AbpOrganizationUnits", + column: "ParentId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", + table: "AbpPermissionGrants", + columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" }, + unique: true, + filter: "[TenantId] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissionGroups_Name", + table: "AbpPermissionGroups", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissions_GroupName", + table: "AbpPermissions", + column: "GroupName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpPermissions_Name", + table: "AbpPermissions", + column: "Name", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoleClaims_RoleId", + table: "AbpRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpRoles_NormalizedName", + table: "AbpRoles", + column: "NormalizedName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Action", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Action" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_ApplicationName", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "ApplicationName" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_Identity", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "Identity" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSecurityLogs_TenantId_UserId", + table: "AbpSecurityLogs", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_Device", + table: "AbpSessions", + column: "Device"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_SessionId", + table: "AbpSessions", + column: "SessionId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpSessions_TenantId_UserId", + table: "AbpSessions", + columns: new[] { "TenantId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserClaims_UserId", + table: "AbpUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserLogins_LoginProvider_ProviderKey", + table: "AbpUserLogins", + columns: new[] { "LoginProvider", "ProviderKey" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", + table: "AbpUserOrganizationUnits", + columns: new[] { "UserId", "OrganizationUnitId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUserRoles_RoleId_UserId", + table: "AbpUserRoles", + columns: new[] { "RoleId", "UserId" }); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_Email", + table: "AbpUsers", + column: "Email"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedEmail", + table: "AbpUsers", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_NormalizedUserName", + table: "AbpUsers", + column: "NormalizedUserName"); + + migrationBuilder.CreateIndex( + name: "IX_AbpUsers_UserName", + table: "AbpUsers", + column: "UserName"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpClaimTypes"); + + migrationBuilder.DropTable( + name: "AbpLinkUsers"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnitRoles"); + + migrationBuilder.DropTable( + name: "AbpPermissionGrants"); + + migrationBuilder.DropTable( + name: "AbpPermissionGroups"); + + migrationBuilder.DropTable( + name: "AbpPermissions"); + + migrationBuilder.DropTable( + name: "AbpRoleClaims"); + + migrationBuilder.DropTable( + name: "AbpSecurityLogs"); + + migrationBuilder.DropTable( + name: "AbpSessions"); + + migrationBuilder.DropTable( + name: "AbpUserClaims"); + + migrationBuilder.DropTable( + name: "AbpUserDelegations"); + + migrationBuilder.DropTable( + name: "AbpUserLogins"); + + migrationBuilder.DropTable( + name: "AbpUserOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpUserRoles"); + + migrationBuilder.DropTable( + name: "AbpUserTokens"); + + migrationBuilder.DropTable( + name: "AbpOrganizationUnits"); + + migrationBuilder.DropTable( + name: "AbpRoles"); + + migrationBuilder.DropTable( + name: "AbpUsers"); + } + } +} diff --git a/modules/virtual-file-explorer/app/Migrations/DemoAppDbContextModelSnapshot.cs b/modules/virtual-file-explorer/app/Migrations/DemoAppDbContextModelSnapshot.cs new file mode 100644 index 0000000000..2dc39f2526 --- /dev/null +++ b/modules/virtual-file-explorer/app/Migrations/DemoAppDbContextModelSnapshot.cs @@ -0,0 +1,982 @@ +// +using System; +using DemoApp.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace DemoApp.Migrations +{ + [DbContext(typeof(DemoAppDbContext))] + partial class DemoAppDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "9.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("bit") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("bit") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("bit") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Device") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeviceInfo") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IpAddresses") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("LastAccessed") + .HasColumnType("datetime2"); + + b.Property("SessionId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("SignedIn") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Device"); + + b.HasIndex("SessionId"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSessions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("bit") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetimeoffset"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("bit"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("StartTime") + .HasColumnType("datetime2"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("nvarchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("bit"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique() + .HasFilter("[TenantId] IS NOT NULL"); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/modules/virtual-file-explorer/app/Pages/Index.cshtml b/modules/virtual-file-explorer/app/Pages/Index.cshtml new file mode 100644 index 0000000000..2b4fd37270 --- /dev/null +++ b/modules/virtual-file-explorer/app/Pages/Index.cshtml @@ -0,0 +1,4 @@ +@page +@using Volo.Abp.Users +@model DemoApp.Pages.IndexModel +@inject ICurrentUser CurrentUser diff --git a/modules/virtual-file-explorer/app/Pages/Index.cshtml.cs b/modules/virtual-file-explorer/app/Pages/Index.cshtml.cs new file mode 100644 index 0000000000..5f8da0f725 --- /dev/null +++ b/modules/virtual-file-explorer/app/Pages/Index.cshtml.cs @@ -0,0 +1,8 @@ +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace DemoApp.Pages; + +public class IndexModel : AbpPageModel +{ + +} \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Pages/_ViewImports.cshtml b/modules/virtual-file-explorer/app/Pages/_ViewImports.cshtml new file mode 100644 index 0000000000..6d6bdbde94 --- /dev/null +++ b/modules/virtual-file-explorer/app/Pages/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Program.cs b/modules/virtual-file-explorer/app/Program.cs similarity index 50% rename from modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Program.cs rename to modules/virtual-file-explorer/app/Program.cs index 4b2c43079c..3471652b7c 100644 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Program.cs +++ b/modules/virtual-file-explorer/app/Program.cs @@ -1,47 +1,46 @@ -using System; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Serilog; -using Serilog.Events; - -namespace Volo.Abp.VirtualFileExplorer.DemoApp; - -public class Program -{ - public static async Task Main(string[] args) - { - Log.Logger = new LoggerConfiguration() - .MinimumLevel.Debug() - .MinimumLevel.Override("Microsoft", LogEventLevel.Information) - .Enrich.FromLogContext() - .WriteTo.File("Logs/logs.txt") - .CreateLogger(); - - try - { - Log.Information("Starting web host."); +using Serilog; +using Serilog.Events; + +namespace DemoApp; + +public class Program +{ + public async static Task Main(string[] args) + { + Log.Logger = new LoggerConfiguration() + .MinimumLevel.Debug() + .MinimumLevel.Override("Microsoft", LogEventLevel.Information) + .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning) + .WriteTo.Async(c => c.Console()) + .CreateLogger(); + + try + { var builder = WebApplication.CreateBuilder(args); - builder.Host - .AddAppSettingsSecretsJson() - .UseSerilog() + builder.Host.AddAppSettingsSecretsJson() .UseAutofac() - ; - await builder.AddApplicationAsync(); + .UseSerilog(); + + await builder.AddApplicationAsync(); var app = builder.Build(); await app.InitializeApplicationAsync(); - await app.RunAsync(); - return 0; - } - catch (Exception ex) - { - Log.Fatal(ex, "Host terminated unexpectedly!"); - return 1; - } - finally - { - Log.CloseAndFlush(); - } - } -} + Log.Information("Starting DemoApp."); + await app.RunAsync(); + return 0; + } + catch (Exception ex) + { + if (ex is HostAbortedException) + { + throw; + } + + Log.Fatal(ex, "DemoApp terminated unexpectedly!"); + return 1; + } + finally + { + Log.CloseAndFlush(); + } + } +} diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Properties/launchSettings.json b/modules/virtual-file-explorer/app/Properties/launchSettings.json similarity index 70% rename from modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Properties/launchSettings.json rename to modules/virtual-file-explorer/app/Properties/launchSettings.json index 83b0d02709..c0680d491c 100644 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Properties/launchSettings.json +++ b/modules/virtual-file-explorer/app/Properties/launchSettings.json @@ -3,8 +3,8 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:51233", - "sslPort": 44377 + "applicationUrl": "https://localhost:44391/", + "sslPort": 44391 } }, "profiles": { @@ -15,13 +15,13 @@ "ASPNETCORE_ENVIRONMENT": "Development" } }, - "Volo.Abp.VirtualFileExplorer.DemoApp": { + "DemoApp": { "commandName": "Project", "launchBrowser": true, - "applicationUrl": "https://localhost:5001;http://localhost:5000", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - } + }, + "applicationUrl": "https://localhost:44391/" } } -} +} \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/AbpVirtualFileExplorerDemoAppModule.cs b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/AbpVirtualFileExplorerDemoAppModule.cs deleted file mode 100644 index c7cc5f4484..0000000000 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/AbpVirtualFileExplorerDemoAppModule.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; -using Volo.Abp.Autofac; -using Volo.Abp.Localization; -using Volo.Abp.Modularity; -using Volo.Abp.VirtualFileExplorer.Web; - -namespace Volo.Abp.VirtualFileExplorer.DemoApp; - -[DependsOn( - typeof(AbpAutofacModule), - typeof(AbpAspNetCoreMvcUiBasicThemeModule), - typeof(AbpVirtualFileExplorerWebModule) -)] -public class AbpVirtualFileExplorerDemoAppModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); - options.Languages.Add(new LanguageInfo("en", "en", "English")); - options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish")); - options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); - options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi")); - options.Languages.Add(new LanguageInfo("is", "is", "Icelandic")); - options.Languages.Add(new LanguageInfo("it", "it", "Italiano")); - options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); - options.Languages.Add(new LanguageInfo("ro-RO", "ro-RO", "Română")); - options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak")); - options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); - options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); - options.Languages.Add(new LanguageInfo("el", "el", "Ελληνικά")); - }); - } - - public override void OnApplicationInitialization(ApplicationInitializationContext context) - { - var app = context.GetApplicationBuilder(); - - app.MapAbpStaticAssets(); - app.UseRouting(); - app.UseAbpRequestLocalization(); - app.UseConfiguredEndpoints(); - } -} diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Branding/AbpVirtualFileExplorerDemoAppBrandingProvider.cs b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Branding/AbpVirtualFileExplorerDemoAppBrandingProvider.cs deleted file mode 100644 index 89659be15c..0000000000 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Branding/AbpVirtualFileExplorerDemoAppBrandingProvider.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Volo.Abp.Ui.Branding; -using Volo.Abp.DependencyInjection; - -namespace Volo.Abp.VirtualFileExplorer.DemoApp.Branding; - -[Dependency(ReplaceServices = true)] -public class AbpVirtualFileExplorerDemoAppBrandingProvider : DefaultBrandingProvider -{ - public AbpVirtualFileExplorerDemoAppBrandingProvider() - { - AppName = "Virtual file explorer demo app"; - - - } - - public override string AppName { get; } - - public override string LogoUrl { get; } -} diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Pages/Index.cshtml b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Pages/Index.cshtml deleted file mode 100644 index fb6ccb3305..0000000000 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Pages/Index.cshtml +++ /dev/null @@ -1,14 +0,0 @@ -@page - -@model Volo.Abp.VirtualFileExplorer.DemoApp.Pages.IndexModel - -
-
-
-

Virtual file explprer demo application

-
-
-
- abp.io - -
diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Pages/Index.cshtml.cs b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Pages/Index.cshtml.cs deleted file mode 100644 index 779bdd97e8..0000000000 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Pages/Index.cshtml.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; -using Microsoft.Extensions.Logging; - -namespace Volo.Abp.VirtualFileExplorer.DemoApp.Pages; - -public class IndexModel : PageModel -{ - private readonly ILogger _logger; - - public IndexModel(ILogger logger) - { - _logger = logger; - } - - public void OnGet() - { - } -} diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Pages/_ViewImports.cshtml b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Pages/_ViewImports.cshtml deleted file mode 100644 index 231948b339..0000000000 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Pages/_ViewImports.cshtml +++ /dev/null @@ -1,4 +0,0 @@ -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI -@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap -@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Volo.Abp.VirtualFileExplorer.DemoApp.abppkg b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Volo.Abp.VirtualFileExplorer.DemoApp.abppkg deleted file mode 100644 index 9e26dfeeb6..0000000000 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Volo.Abp.VirtualFileExplorer.DemoApp.abppkg +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Volo.Abp.VirtualFileExplorer.DemoApp.abppkg.analyze.json b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Volo.Abp.VirtualFileExplorer.DemoApp.abppkg.analyze.json deleted file mode 100644 index ad8a90c8bd..0000000000 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Volo.Abp.VirtualFileExplorer.DemoApp.abppkg.analyze.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "Volo.Abp.VirtualFileExplorer.DemoApp", - "hash": "a8ae8e893f31975f0699e38091b149aa", - "contents": [ - { - "namespace": "Volo.Abp.VirtualFileExplorer.DemoApp", - "dependsOnModules": [ - { - "declaringAssemblyName": "Volo.Abp.Autofac", - "namespace": "Volo.Abp.Autofac", - "name": "AbpAutofacModule" - }, - { - "declaringAssemblyName": "Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic", - "namespace": "Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic", - "name": "AbpAspNetCoreMvcUiBasicThemeModule" - }, - { - "declaringAssemblyName": "Volo.Abp.VirtualFileExplorer.Web", - "namespace": "Volo.Abp.VirtualFileExplorer.Web", - "name": "AbpVirtualFileExplorerWebModule" - } - ], - "implementingInterfaces": [ - { - "name": "IAbpModule", - "namespace": "Volo.Abp.Modularity", - "declaringAssemblyName": "Volo.Abp.Core", - "fullName": "Volo.Abp.Modularity.IAbpModule" - }, - { - "name": "IOnPreApplicationInitialization", - "namespace": "Volo.Abp.Modularity", - "declaringAssemblyName": "Volo.Abp.Core", - "fullName": "Volo.Abp.Modularity.IOnPreApplicationInitialization" - }, - { - "name": "IOnApplicationInitialization", - "namespace": "Volo.Abp", - "declaringAssemblyName": "Volo.Abp.Core", - "fullName": "Volo.Abp.IOnApplicationInitialization" - }, - { - "name": "IOnPostApplicationInitialization", - "namespace": "Volo.Abp.Modularity", - "declaringAssemblyName": "Volo.Abp.Core", - "fullName": "Volo.Abp.Modularity.IOnPostApplicationInitialization" - }, - { - "name": "IOnApplicationShutdown", - "namespace": "Volo.Abp", - "declaringAssemblyName": "Volo.Abp.Core", - "fullName": "Volo.Abp.IOnApplicationShutdown" - }, - { - "name": "IPreConfigureServices", - "namespace": "Volo.Abp.Modularity", - "declaringAssemblyName": "Volo.Abp.Core", - "fullName": "Volo.Abp.Modularity.IPreConfigureServices" - }, - { - "name": "IPostConfigureServices", - "namespace": "Volo.Abp.Modularity", - "declaringAssemblyName": "Volo.Abp.Core", - "fullName": "Volo.Abp.Modularity.IPostConfigureServices" - } - ], - "contentType": "abpModule", - "name": "AbpVirtualFileExplorerDemoAppModule", - "summary": null - } - ] -} \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Volo.Abp.VirtualFileExplorer.DemoApp.csproj b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Volo.Abp.VirtualFileExplorer.DemoApp.csproj deleted file mode 100644 index 683766e077..0000000000 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Volo.Abp.VirtualFileExplorer.DemoApp.csproj +++ /dev/null @@ -1,33 +0,0 @@ - - - - net9.0 - aspnet-Volo.Abp.VirtualFileExplorer.DemoApp-234AF9E1-C3E0-4F8F-BD7D-840627CC8E46 - - - - - - - - - - - - - - - - - true - PreserveNewest - PreserveNewest - - - - - - - - - diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/abp.resourcemapping.js b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/abp.resourcemapping.js deleted file mode 100644 index 8c0bb53dad..0000000000 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/abp.resourcemapping.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = { - aliases: { - "@node_modules": "./node_modules", - "@libs": "./wwwroot/libs" - }, - clean: [ - "@libs" - ], - mappings: { - - } -}; diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/gulpfile.js b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/gulpfile.js deleted file mode 100644 index f7ebc78f23..0000000000 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/gulpfile.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var gulp = require("gulp"), - path = require('path'), - copyResources = require('./node_modules/@abp/aspnetcore.mvc.ui/gulp/copy-resources.js'); - -exports.default = function(){ - return copyResources(path.resolve('./')); -}; \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/yarn.lock b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/yarn.lock deleted file mode 100644 index 216bbe0cb2..0000000000 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/yarn.lock +++ /dev/null @@ -1,391 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@abp/aspnetcore.mvc.ui.theme.basic@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.1.0.tgz#e9e0321037c34b43145dfc7827c422fbf79f59ab" - integrity sha512-vLkyrdFXw0/MPyU2hzqGJJk7trmIlVMdflNIe/rF77UIRmJYHWaTmPt9i5PLN/O4s0jnE9kWlaaJ/VnnFWeGsQ== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~9.1.0" - -"@abp/aspnetcore.mvc.ui.theme.shared@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.1.0.tgz#35a73580b9b67a33708f2cf897243b50c9ad7100" - integrity sha512-rggTYL9poOFICsOseDX22JNhD0KWH8Oxs0YH91TZjvm/F67cPemW99eBlJc/YdJ7bN6icRiebN8m81y9MSanyg== - dependencies: - "@abp/aspnetcore.mvc.ui" "~9.1.0" - "@abp/bootstrap" "~9.1.0" - "@abp/bootstrap-datepicker" "~9.1.0" - "@abp/bootstrap-daterangepicker" "~9.1.0" - "@abp/datatables.net-bs5" "~9.1.0" - "@abp/font-awesome" "~9.1.0" - "@abp/jquery-form" "~9.1.0" - "@abp/jquery-validation-unobtrusive" "~9.1.0" - "@abp/lodash" "~9.1.0" - "@abp/luxon" "~9.1.0" - "@abp/malihu-custom-scrollbar-plugin" "~9.1.0" - "@abp/moment" "~9.1.0" - "@abp/select2" "~9.1.0" - "@abp/sweetalert2" "~9.1.0" - "@abp/timeago" "~9.1.0" - "@abp/toastr" "~9.1.0" - -"@abp/aspnetcore.mvc.ui@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.1.0.tgz#38d058ab148a36ad4d63870e8a501ca339e4a70e" - integrity sha512-lUw1ij87KJp+Rj4cz8oSQkdRuoMq76l/wIAGwtXH+EOKusVpSJTOTioAV/tPKeKZ15ubE4bO5jWcQGxZkXgH3w== - dependencies: - ansi-colors "^4.1.3" - -"@abp/bootstrap-datepicker@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.1.0.tgz#96a1875a2b92f03b8f90f7842ebf8849cf8a4d04" - integrity sha512-3FQm1SK8qmzoP7LOvXkZpq1AzrdPHKRdQJjoqK9N+lQxQjNfOxEFMxeDSg6WJKO619Cnve++jAyMidojXlCiwQ== - dependencies: - bootstrap-datepicker "^1.10.0" - -"@abp/bootstrap-daterangepicker@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.1.0.tgz#1993c539837eb31de174cba9f0bccd441a98f209" - integrity sha512-jS1jTqP6KCXQYX9xZpDAI07C94nwzXrNJD3H0pJXsXoOva3TTBQDD8khf6RDb7tiZrkrNJqmMyUiCfVTDbO7zg== - dependencies: - bootstrap-daterangepicker "^3.1.0" - -"@abp/bootstrap@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-9.1.0.tgz#a06c1cd4c11554c29973db70c6a383efebb10b4e" - integrity sha512-r6onkBnpqoWrdYLDVZTiqgQBvH5UZerYRrPB3Ky+RkXJhgwn7AM3LAVrB42sIvFZRNbwOlvuAL+a0+5yDOH67Q== - dependencies: - "@abp/core" "~9.1.0" - bootstrap "^5.3.3" - -"@abp/clipboard@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-9.1.0.tgz#5d5678ef7e8c355715c5a74e4aabd0a21d5e6cbe" - integrity sha512-1TxZbB/q5DPeLhYzrc6y0OVekxnjM+CRH/Gu8nAXQMX46XjdTboXvBtvgKHV1aCznGNsWyjd5A2O5G/XGg9NNw== - dependencies: - "@abp/core" "~9.1.0" - clipboard "^2.0.11" - -"@abp/core@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-9.1.0.tgz#af78fc096932d4ec45216b5e910c87a72e479b1f" - integrity sha512-6P0KGh5+IqlhQnUOyzaGaKrKzOAm1G0gg8Ay3DXyW2ksY6Zr+lyi5cxNsSi4ix1dicqfydIKvLfV+DF3mQf/dw== - dependencies: - "@abp/utils" "~9.1.0" - -"@abp/datatables.net-bs5@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-9.1.0.tgz#3b2e7d68e947db3d3432ab5e8bff4da89a85d05d" - integrity sha512-zBrzOrfvTPJcc6mvHZDPVdXbWesKU0lKlrb7vuBZxWjrFNwVC0d/KNJPcYVvyQ3zf9rrQB5Xg0MDgu0k5Tt7tQ== - dependencies: - "@abp/datatables.net" "~9.1.0" - datatables.net-bs5 "^2.1.8" - -"@abp/datatables.net@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-9.1.0.tgz#12d6e1412aac4a2e0a61437dcdfbfbe1add7fed7" - integrity sha512-lYRvEZUkntaI+dS9Xkz23Z54eDeZ1R4Wzhqcg6VIsz3iO5kYAa5GiQjcOiBssNGJSLuaet6R5Pqh1ThEUjfvvA== - dependencies: - "@abp/jquery" "~9.1.0" - datatables.net "^2.1.8" - -"@abp/font-awesome@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-9.1.0.tgz#af21ff2d7c332deb1df626404b53a78d790ba842" - integrity sha512-HcJzDCACGejOIvhxsorCdaesyDHnupR/sl5YFCsGikSqATyOSKQy4pw8wKsb1z+FCT5JYCTR7ROJ3lB1lTEgZw== - dependencies: - "@abp/core" "~9.1.0" - "@fortawesome/fontawesome-free" "^6.6.0" - -"@abp/jquery-form@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-9.1.0.tgz#bdb96436c54b2a09ac4259db97e1e577410e1fc3" - integrity sha512-xjHXWstVY6B3MPB4/8g0EJeHlVvlV010OMZKFmfCGLFi6aHAEKqqWh1rMItAiVuSmCCzL0m/208ZkpoCI++jGQ== - dependencies: - "@abp/jquery" "~9.1.0" - jquery-form "^4.3.0" - -"@abp/jquery-validation-unobtrusive@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.1.0.tgz#798551e7c14ba286a819a48804107a53e974c1ee" - integrity sha512-TggKckfbLtB7Ig2kNt2kH//GaJUns8OZbpdKdh7vCWIAGedw2FLNCABCpoGnyNp0s/dVOtdyxRl9eFRN3+a4tw== - dependencies: - "@abp/jquery-validation" "~9.1.0" - jquery-validation-unobtrusive "^4.0.0" - -"@abp/jquery-validation@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-9.1.0.tgz#b771652377fbfb3c92ce03b7b7c069a3bb2ae70b" - integrity sha512-bmPSOHcxjitB8NkiLv0SxxuSS3FlCq9SiTUGvsT8nOStDsm+KpyYSzZQq8LSCyqWWj54tlOARTfcD4tMK7/K3Q== - dependencies: - "@abp/jquery" "~9.1.0" - jquery-validation "^1.21.0" - -"@abp/jquery@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-9.1.0.tgz#952b61ea3e4a99e6551f667297dbb637d83f3c50" - integrity sha512-Ulw8ClAbqmxceNYCb76bR6dq7e9b7Hs6mjlEy05zdbsSNuZW3UoycsJ+BquXi+dUNBo6OppqEmhVeiIjAKTaFg== - dependencies: - "@abp/core" "~9.1.0" - jquery "~3.7.1" - -"@abp/lodash@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-9.1.0.tgz#62c784bd99c9e1ccfa82905e843375c594ef8584" - integrity sha512-cCE3ZwwWcPrh+ccKx4AS1USL1ttbrXBqci/l+ROjXhFzrs6GYnhI0+30xRZgPdPRm3U3nGPrSaDAU7UuHkRScg== - dependencies: - "@abp/core" "~9.1.0" - lodash "^4.17.21" - -"@abp/luxon@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-9.1.0.tgz#b246f3627bbc7ce41b7878fce1679da473b0e0ae" - integrity sha512-AouS/qEK+i69hwr4XtUOCepONLuR+1gdHFb50RpOEbUoDfTYmYpxPBdiICmZPeJ3CExErITPZxzzngCnKPPOUw== - dependencies: - "@abp/core" "~9.1.0" - luxon "^3.5.0" - -"@abp/malihu-custom-scrollbar-plugin@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.1.0.tgz#288ae1916a78100f2c728dfd05a560ee99fafae4" - integrity sha512-McdMRDtbTZBjp//3GMVjRjkc16HNYDEdPc2ar1xrY817e0tEln6/TBkItAcfOvjso0TsLcvlNL1+1bjbMjj8OA== - dependencies: - "@abp/core" "~9.1.0" - malihu-custom-scrollbar-plugin "^3.1.5" - -"@abp/moment@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-9.1.0.tgz#f3c0ae02209e496913cda53df752dabc5be648bd" - integrity sha512-WxR1l09vwxRhqyvAVP4m4IBOFjIC4pzLOmelloqES+gL/klw+T/AmY21Z/z+OV0p7aJ3V3Q1aQStuMCDCyGFnQ== - dependencies: - moment "^2.30.1" - -"@abp/prismjs@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-9.1.0.tgz#40b688c82ae808ef92516ea5731ccb38c19d2384" - integrity sha512-trSW1K6VtIEaAyxe7umQGimCTLrgdT6DwSiQ8PONvKa8WR5ZmzSDU7lK8SliorufkbWtdkjCvuXB81NGt3tAhQ== - dependencies: - "@abp/clipboard" "~9.1.0" - "@abp/core" "~9.1.0" - prismjs "^1.29.0" - -"@abp/select2@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-9.1.0.tgz#9c2c6751f8506fb375c9b7c42a008c168a8f4c75" - integrity sha512-n6HqsH8aFLMrqL6LJ0gsHFlaq6T1QSt/x7HkkZyhDC7CwhXajxtsJEstDnDF9naHSXX/lerPbrHEgzn2QRMBqg== - dependencies: - "@abp/core" "~9.1.0" - select2 "^4.0.13" - -"@abp/sweetalert2@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-9.1.0.tgz#660f9b1db60cc04bde6cadbcf3c55320d20c2f3e" - integrity sha512-z3JMeAwva2vR8qZSRJ/BisQDdAEqjDJ/6oIGu/JYXQEchO1Lnd9UMV376nc3crLJdnyRRO7Qs6zx4FfVOCH0kw== - dependencies: - "@abp/core" "~9.1.0" - sweetalert2 "^11.14.1" - -"@abp/timeago@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-9.1.0.tgz#496e40153241bae5d418d79cc6c65c9db6306447" - integrity sha512-a/UAYQ2GrhYFGx4p0hqr3x+teBqnjnOiWJEPq9//RTlz+EZ+OUyHbJrcUtqZRvaGJtOAsfmljD3jYnOXUlU7DA== - dependencies: - "@abp/jquery" "~9.1.0" - timeago "^1.6.7" - -"@abp/toastr@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-9.1.0.tgz#501cbe211164b2e7416a2d4878cb34aed3550b7c" - integrity sha512-BkTDuU0p9Qa4+HT9CYwiPQjVTrbTSNBgQ18h69S3lIadLJwdC6pXeLbL9bhe+5fiuhq2f+0Oqo3X75LNEgzHkw== - dependencies: - "@abp/jquery" "~9.1.0" - toastr "^2.1.4" - -"@abp/utils@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-9.1.0.tgz#a4fd37d943df18b5c11f5d4869efd5d8882b7959" - integrity sha512-+UZo0ocTEZlRO41SzzHNdinjdFUDVq8wYZSj5BA1bqCVeWYhfjI2+rl9DuogCN8UEuCACA4K/qb4XcE/untQ3g== - dependencies: - just-compare "^2.3.0" - -"@abp/virtual-file-explorer@~9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@abp/virtual-file-explorer/-/virtual-file-explorer-9.1.0.tgz#9a140afb19db28b281f91c83beeb4883cf7d78b1" - integrity sha512-6g3HOiYowLRDmjuIS8zEuauGPf5XEtP8V/D6483+NQ0ysrn/GDposToINDBNXjqGWLWYZNcRSG80APM457P4Fw== - dependencies: - "@abp/clipboard" "~9.1.0" - "@abp/prismjs" "~9.1.0" - -"@fortawesome/fontawesome-free@^6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-6.6.0.tgz#0e984f0f2344ee513c185d87d77defac4c0c8224" - integrity sha512-60G28ke/sXdtS9KZCpZSHHkCbdsOGEhIUGlwq6yhY74UpTiToIh8np7A8yphhM4BWsvNFtIvLpi4co+h9Mr9Ow== - -ansi-colors@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - -bootstrap-datepicker@^1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/bootstrap-datepicker/-/bootstrap-datepicker-1.10.0.tgz#61612bbe8bf0a69a5bce32bbcdda93ebb6ccf24a" - integrity sha512-lWxtSYddAQOpbAO8UhYhHLcK6425eWoSjb5JDvZU3ePHEPF6A3eUr51WKaFy4PccU19JRxUG6wEU3KdhtKfvpg== - dependencies: - jquery ">=3.4.0 <4.0.0" - -bootstrap-daterangepicker@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bootstrap-daterangepicker/-/bootstrap-daterangepicker-3.1.0.tgz#632e6fb2de4b6360c5c0a9d5f6adb9aace051fe8" - integrity sha512-oaQZx6ZBDo/dZNyXGVi2rx5GmFXThyQLAxdtIqjtLlYVaQUfQALl5JZMJJZzyDIX7blfy4ppZPAJ10g8Ma4d/g== - dependencies: - jquery ">=1.10" - moment "^2.9.0" - -bootstrap@^5.3.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.3.tgz#de35e1a765c897ac940021900fcbb831602bac38" - integrity sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg== - -clipboard@^2.0.11: - version "2.0.11" - resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.11.tgz#62180360b97dd668b6b3a84ec226975762a70be5" - integrity sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw== - dependencies: - good-listener "^1.2.2" - select "^1.1.2" - tiny-emitter "^2.0.0" - -datatables.net-bs5@^2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/datatables.net-bs5/-/datatables.net-bs5-2.1.8.tgz#860717c4ee85ecb84812ba9a73fb1204aa2a68b6" - integrity sha512-YlGws8eI3iw/1AmKJH18+YMzm/UgGb6o9s14KAC24QT1/8anolm8GnVAgGcwUcvHm3hn1i8A5QXqgbqeMRINeg== - dependencies: - datatables.net "2.1.8" - jquery ">=1.7" - -datatables.net@2.1.8, datatables.net@^2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/datatables.net/-/datatables.net-2.1.8.tgz#9b020f18e927cc924d72411f62dc595cc688669b" - integrity sha512-47ULt+U4bcjbuGTpTlT6SnCuSFVRBxxdWa6X3NfvTObBJ2BZU0o+JUIl05wQ6cABNIavjbAV51gpgvFsMHL9zA== - dependencies: - jquery ">=1.7" - -delegate@^3.1.2: - version "3.2.0" - resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" - integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== - -good-listener@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50" - integrity sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw== - dependencies: - delegate "^3.1.2" - -jquery-form@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/jquery-form/-/jquery-form-4.3.0.tgz#7d3961c314a1f2d15298f4af1d3943f54f4149c6" - integrity sha512-q3uaVCEWdLOYUCI6dpNdwf/7cJFOsUgdpq6r0taxtGQ5NJSkOzofyWm4jpOuJ5YxdmL1FI5QR+q+HB63HHLGnQ== - dependencies: - jquery ">=1.7.2" - -jquery-mousewheel@>=3.0.6: - version "3.1.13" - resolved "https://registry.yarnpkg.com/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz#06f0335f16e353a695e7206bf50503cb523a6ee5" - integrity sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg== - -jquery-validation-unobtrusive@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-4.0.0.tgz#dfcf25a558496a2c883db6021d10f5398d15f99d" - integrity sha512-1ervYFFv6LX/rp7ktuLnMakHNG0piNRDyROI8Ir3hL1vPIwylAehB1AY3BPrYJnzW3WmwWryZq+Bz4sazZK9iQ== - dependencies: - jquery "^3.6.0" - jquery-validation ">=1.19" - -jquery-validation@>=1.19, jquery-validation@^1.21.0: - version "1.21.0" - resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.21.0.tgz#78fc05ab76020912a246af3661b3f54a438bca93" - integrity sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w== - -jquery@>=1.10, jquery@>=1.12.0, "jquery@>=1.5.0 <4.0", jquery@>=1.7, jquery@>=1.7.2: - version "3.6.4" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.4.tgz#ba065c188142100be4833699852bf7c24dc0252f" - integrity sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ== - -"jquery@>=3.4.0 <4.0.0", jquery@^3.6.0, jquery@~3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de" - integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg== - -just-compare@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/just-compare/-/just-compare-2.3.0.tgz#a2adcc1d1940536263275f5a1ef1298bcacfeda7" - integrity sha512-6shoR7HDT+fzfL3gBahx1jZG3hWLrhPAf+l7nCwahDdT9XDtosB9kIF0ZrzUp5QY8dJWfQVr5rnsPqsbvflDzg== - -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -luxon@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.5.0.tgz#6b6f65c5cd1d61d1fd19dbf07ee87a50bf4b8e20" - integrity sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ== - -malihu-custom-scrollbar-plugin@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.1.5.tgz#310cecc5e59415a1c29e9dfb5d2b6e01d66a29ef" - integrity sha512-lwW3LgI+CNDMPnP4ED2la6oYxWMkCXlnhex+s2wuOLhFDFGnGmQuTQVdRK9bvDLpxs10sGlfErVufJy9ztfgJQ== - dependencies: - jquery-mousewheel ">=3.0.6" - -moment@^2.30.1: - version "2.30.1" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" - integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== - -moment@^2.9.0: - version "2.29.4" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" - integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== - -prismjs@^1.29.0: - version "1.29.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.29.0.tgz#f113555a8fa9b57c35e637bba27509dcf802dd12" - integrity sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q== - -select2@^4.0.13: - version "4.0.13" - resolved "https://registry.yarnpkg.com/select2/-/select2-4.0.13.tgz#0dbe377df3f96167c4c1626033e924372d8ef44d" - integrity sha512-1JeB87s6oN/TDxQQYCvS5EFoQyvV6eYMZZ0AeA4tdFDYWN3BAGZ8npr17UBFddU0lgAt3H0yjX3X6/ekOj1yjw== - -select@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" - integrity sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA== - -sweetalert2@^11.14.1: - version "11.14.4" - resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-11.14.4.tgz#0186439674ea4f15991e41cea3af203ee497853c" - integrity sha512-8QMzjxCuinwm18EK5AtYvuhP+lRMRxTWVXy8om9wGlULsXSI4TD29kyih3VYrSXMMBlD4EShFvNC7slhTC7j0w== - -timeago@^1.6.7: - version "1.6.7" - resolved "https://registry.yarnpkg.com/timeago/-/timeago-1.6.7.tgz#afd467c29a911e697fc22a81888c7c3022783cb5" - integrity sha512-FikcjN98+ij0siKH4VO4dZ358PR3oDDq4Vdl1+sN9gWz1/+JXGr3uZbUShYH/hL7bMhcTpPbplJU5Tej4b4jbQ== - dependencies: - jquery ">=1.5.0 <4.0" - -tiny-emitter@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" - integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== - -toastr@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/toastr/-/toastr-2.1.4.tgz#8b43be64fb9d0c414871446f2db8e8ca4e95f181" - integrity sha512-LIy77F5n+sz4tefMmFOntcJ6HL0Fv3k1TDnNmFZ0bU/GcvIIfy6eG2v7zQmMiYgaalAiUv75ttFrPn5s0gyqlA== - dependencies: - jquery ">=1.12.0" diff --git a/modules/virtual-file-explorer/app/abp.resourcemapping.js b/modules/virtual-file-explorer/app/abp.resourcemapping.js new file mode 100644 index 0000000000..3129042151 --- /dev/null +++ b/modules/virtual-file-explorer/app/abp.resourcemapping.js @@ -0,0 +1,7 @@ +module.exports = { + aliases: { + + }, + mappings: { + } +}; diff --git a/modules/virtual-file-explorer/app/appsettings.json b/modules/virtual-file-explorer/app/appsettings.json new file mode 100644 index 0000000000..4d1712a519 --- /dev/null +++ b/modules/virtual-file-explorer/app/appsettings.json @@ -0,0 +1,14 @@ +{ + "ConnectionStrings": { + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=VirtualFileExplorerDemoApp;Trusted_Connection=True;TrustServerCertificate=True" + }, + "Settings": { + "Abp.Identity.Password.RequireNonAlphanumeric": "false", + "Abp.Identity.Password.RequireLowercase": "false", + "Abp.Identity.Password.RequireUppercase": "false", + "Abp.Identity.Password.RequireDigit": "false" + }, + "StringEncryption": { + "DefaultPassPhrase": "Qn7xFuzxdr4NIxvE" + } +} diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/package.json b/modules/virtual-file-explorer/app/package.json similarity index 78% rename from modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/package.json rename to modules/virtual-file-explorer/app/package.json index 8f454ff41f..999c375067 100644 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/package.json +++ b/modules/virtual-file-explorer/app/package.json @@ -1,9 +1,9 @@ -{ - "name": "volo.virtualfileexplorer.dempapp", - "version": "1.0.0", - "private": true, - "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "~9.1.0", - "@abp/virtual-file-explorer": "~9.1.0" - } -} +{ + "version": "1.0.0", + "name": "my-app", + "private": true, + "dependencies": { + "@abp/aspnetcore.mvc.ui.theme.basic": "~9.1.0", + "@abp/virtual-file-explorer": "~9.1.0" + } +} diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/FodyWeavers.xml b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/FodyWeavers.xml similarity index 63% rename from modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/FodyWeavers.xml rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/FodyWeavers.xml index 4367b6b2c9..1715698ccd 100644 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/FodyWeavers.xml +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/FodyWeavers.xml @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/FodyWeavers.xsd b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/FodyWeavers.xsd similarity index 100% rename from modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/FodyWeavers.xsd rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/FodyWeavers.xsd diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo.Abp.VirtualFileExplorer.Contracts.abppkg b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo.Abp.VirtualFileExplorer.Contracts.abppkg new file mode 100644 index 0000000000..49032794e2 --- /dev/null +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo.Abp.VirtualFileExplorer.Contracts.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.application-contracts" +} \ No newline at end of file diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo.Abp.VirtualFileExplorer.Contracts.abppkg.analyze.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo.Abp.VirtualFileExplorer.Contracts.abppkg.analyze.json new file mode 100644 index 0000000000..0f37f00591 --- /dev/null +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo.Abp.VirtualFileExplorer.Contracts.abppkg.analyze.json @@ -0,0 +1,7 @@ +{ + "name": "Volo.Abp.VirtualFileExplorer.Contracts", + "hash": "", + "contents": [ + + ] + } \ No newline at end of file diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo.Abp.VirtualFileExplorer.Contracts.csproj b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo.Abp.VirtualFileExplorer.Contracts.csproj new file mode 100644 index 0000000000..2d4c3bcb28 --- /dev/null +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo.Abp.VirtualFileExplorer.Contracts.csproj @@ -0,0 +1,30 @@ + + + + + + + netstandard2.0;netstandard2.1;net8.0;net9.0 + Volo.Abp.VirtualFileExplorer.Contracts + Volo.Abp.VirtualFileExplorer.Contracts + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + false + false + false + + + + + + + + + + + + + + + + + diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/AbpVirtualFileExplorerContractsModule.cs b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/AbpVirtualFileExplorerContractsModule.cs new file mode 100644 index 0000000000..4a7821f379 --- /dev/null +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/AbpVirtualFileExplorerContractsModule.cs @@ -0,0 +1,24 @@ +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileExplorer.Localization; +using Volo.Abp.VirtualFileSystem; + +namespace Volo.Abp.VirtualFileExplorer; + +public class AbpVirtualFileExplorerContractsModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + Configure(options => + { + options.Resources + .Add("en") + .AddVirtualJson("/Volo/Abp/VirtualFileExplorer/Localization/Resources"); + }); + } +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/AbpVirtualFileExplorerPermissionDefinitionProvider.cs b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/AbpVirtualFileExplorerPermissionDefinitionProvider.cs new file mode 100644 index 0000000000..fac144d244 --- /dev/null +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/AbpVirtualFileExplorerPermissionDefinitionProvider.cs @@ -0,0 +1,19 @@ +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Localization; +using Volo.Abp.VirtualFileExplorer.Localization; + +namespace Volo.Abp.VirtualFileExplorer; + +public class AbpVirtualFileExplorerPermissionDefinitionProvider : PermissionDefinitionProvider +{ + public override void Define(IPermissionDefinitionContext context) + { + var virtualFileExplorer = context.AddGroup(VirtualFileExplorerPermissions.GroupName, L("Permission:AbpVirtualFileExplorer")); + virtualFileExplorer.AddPermission(VirtualFileExplorerPermissions.View, L("Permission:AbpVirtualFileExplorer:View")); + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/ar.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/ar.json similarity index 77% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/ar.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/ar.json index 643e5ff7be..7375ccafa0 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/ar.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/ar.json @@ -9,6 +9,8 @@ "FileContent": "محتوى الملف", "Size": "المقاس", "BackToRoot": "العودة إلى الجذر", - "EmptyFileInfoList": "لا توجد أى ملفات افتراضية" + "EmptyFileInfoList": "لا توجد أى ملفات افتراضية", + "Permission:AbpVirtualFileExplorer": "مستكشف الملفات الافتراضي", + "Permission:AbpVirtualFileExplorer:View": "عرض" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/cs.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/cs.json similarity index 68% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/cs.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/cs.json index 44f8d06288..4cbdafcadd 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/cs.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/cs.json @@ -9,6 +9,8 @@ "FileContent": "Obsah souboru", "Size": "Velikost", "BackToRoot": "Zpět na kořen", - "EmptyFileInfoList": "Nejsou žádné virtuální soubory" + "EmptyFileInfoList": "Nejsou žádné virtuální soubory", + "Permission:AbpVirtualFileExplorer": "Prohlížeč virtuálních souborů", + "Permission:AbpVirtualFileExplorer:View": "Zobrazit" } } diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/de-DE.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/de-DE.json similarity index 68% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/de-DE.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/de-DE.json index 78e2d41ed4..a4cd4d11b6 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/de-DE.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/de-DE.json @@ -9,6 +9,8 @@ "FileContent": "Dateiinhalt", "Size": "Größe", "BackToRoot": "Zurück zum Stammverzeichnis", - "EmptyFileInfoList": "Es gibt keine virtuellen Dateien" + "EmptyFileInfoList": "Es gibt keine virtuellen Dateien", + "Permission:AbpVirtualFileExplorer": "Virtueller Dateiexplorer", + "Permission:AbpVirtualFileExplorer:View": "Ansicht" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/de.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/de.json similarity index 68% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/de.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/de.json index 6fdd864602..1b0a058adf 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/de.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/de.json @@ -9,6 +9,8 @@ "FileContent": "Dateiinhalt", "Size": "Größe", "BackToRoot": "Zurück zur Wurzel", - "EmptyFileInfoList": "Es gibt keine virtuellen Dateien" + "EmptyFileInfoList": "Es gibt keine virtuellen Dateien", + "Permission:AbpVirtualFileExplorer": "Virtueller Datei-Explorer", + "Permission:AbpVirtualFileExplorer:View": "Ansicht" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/el.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/el.json similarity index 77% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/el.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/el.json index cdfd2bb331..818af6c91f 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/el.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/el.json @@ -9,6 +9,8 @@ "FileContent": "Περιεχόμενο αρχείου", "Size": "Μέγεθος", "BackToRoot": "Επιστροφή στη ρίζα", - "EmptyFileInfoList": "Δεν υπάρχουν εικονικά αρχεία" + "EmptyFileInfoList": "Δεν υπάρχουν εικονικά αρχεία", + "Permission:AbpVirtualFileExplorer": "Εικονικός Εξερευνητής Αρχείων", + "Permission:AbpVirtualFileExplorer:View": "Προβολή" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/en-GB.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/en-GB.json similarity index 67% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/en-GB.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/en-GB.json index cd7cbf3c1a..8da17d88ba 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/en-GB.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/en-GB.json @@ -9,6 +9,8 @@ "FileContent": "File content", "Size": "Size", "BackToRoot": "Back to root", - "EmptyFileInfoList": "There are no virtual files" + "EmptyFileInfoList": "There are no virtual files", + "Permission:AbpVirtualFileExplorer": "Virtual file explorer", + "Permission:AbpVirtualFileExplorer:View": "View" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/en.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/en.json similarity index 67% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/en.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/en.json index 6b794bf791..f3563aafcf 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/en.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/en.json @@ -9,6 +9,8 @@ "FileContent": "File content", "Size": "Size", "BackToRoot": "Back to root", - "EmptyFileInfoList": "There are no virtual files" + "EmptyFileInfoList": "There are no virtual files", + "Permission:AbpVirtualFileExplorer": "Virtual file explorer", + "Permission:AbpVirtualFileExplorer:View": "View" } } diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/es.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/es.json similarity index 70% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/es.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/es.json index e45f76aab0..b4bcd16809 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/es.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/es.json @@ -9,6 +9,8 @@ "FileContent": "Contenido del fichero", "Size": "Tamaño", "BackToRoot": "Volver al raíz", - "EmptyFileInfoList": "No hay ficheros virtuales" + "EmptyFileInfoList": "No hay ficheros virtuales", + "Permission:AbpVirtualFileExplorer": "Explorador de ficheros virtual", + "Permission:AbpVirtualFileExplorer:View": "Ver" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/fa.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/fa.json similarity index 77% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/fa.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/fa.json index 3787092446..839640d6fc 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/fa.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/fa.json @@ -9,6 +9,8 @@ "FileContent": "محتوای فایل", "Size": "اندازه", "BackToRoot": "بازگشت به ریشه", - "EmptyFileInfoList": "هیچ فایل مجازی وجود ندارد" + "EmptyFileInfoList": "هیچ فایل مجازی وجود ندارد", + "Permission:AbpVirtualFileExplorer": "کاوشگر فایل مجازی", + "Permission:AbpVirtualFileExplorer:View": "مشاهده" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/fi.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/fi.json similarity index 68% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/fi.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/fi.json index 3ec395cfa0..8ed05499b9 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/fi.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/fi.json @@ -9,6 +9,8 @@ "FileContent": "Tiedoston sisältö", "Size": "Koko", "BackToRoot": "Takaisin juuriin", - "EmptyFileInfoList": "Virtuaalitiedostoja ei ole" + "EmptyFileInfoList": "Virtuaalitiedostoja ei ole", + "Permission:AbpVirtualFileExplorer": "Virtuaalinen tiedostojen selain", + "Permission:AbpVirtualFileExplorer:View": "Näytä" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/fr.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/fr.json similarity index 68% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/fr.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/fr.json index 0471341bb9..b3e76b99e6 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/fr.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/fr.json @@ -9,6 +9,8 @@ "FileContent": "Contenu du fichier", "Size": "Taille", "BackToRoot": "Retour à la racine", - "EmptyFileInfoList": "Il n’y a pas de fichiers virtuels" + "EmptyFileInfoList": "Il n'y a pas de fichiers virtuels", + "Permission:AbpVirtualFileExplorer": "Explorateur de fichiers virtuels", + "Permission:AbpVirtualFileExplorer:View": "Voir" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/hi.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/hi.json similarity index 76% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/hi.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/hi.json index 09056ed265..dec2b54e62 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/hi.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/hi.json @@ -9,6 +9,8 @@ "FileContent": "फ़ाइल सामग्री", "Size": "आकार", "BackToRoot": "वापस रूट करने के लिए", - "EmptyFileInfoList": "कोई वर्चुअल फ़ाइल नहीं हैं" + "EmptyFileInfoList": "कोई वर्चुअल फ़ाइल नहीं हैं", + "Permission:AbpVirtualFileExplorer": "आभासी फ़ाइल एक्सप्लोरर", + "Permission:AbpVirtualFileExplorer:View": "देखें" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/hr.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/hr.json similarity index 69% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/hr.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/hr.json index 81a7052642..86ca73b02b 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/hr.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/hr.json @@ -9,6 +9,8 @@ "FileContent": "Sadržaj datoteke", "Size": "Veličina", "BackToRoot": "Natrag na korijen", - "EmptyFileInfoList": "Nema virtualnih datoteka" + "EmptyFileInfoList": "Nema virtualnih datoteka", + "Permission:AbpVirtualFileExplorer": "Virtualni preglednik datoteka", + "Permission:AbpVirtualFileExplorer:View": "Pregled" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/hu.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/hu.json similarity index 67% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/hu.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/hu.json index 9a6dddb460..9f963bc9b1 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/hu.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/hu.json @@ -9,6 +9,8 @@ "FileContent": "File tartalma", "Size": "Méret", "BackToRoot": "Vissza a fő mappába", - "EmptyFileInfoList": "Nem találhatóak virtuális fileok" + "EmptyFileInfoList": "Nem találhatóak virtuális fileok", + "Permission:AbpVirtualFileExplorer": "Virtuális file böngésző", + "Permission:AbpVirtualFileExplorer:View": "Megtekintés" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/is.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/is.json similarity index 67% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/is.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/is.json index 550c678913..1382d594c1 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/is.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/is.json @@ -9,6 +9,8 @@ "FileContent": "Innihald skráar", "Size": "Stærð", "BackToRoot": "Aftur í rót", - "EmptyFileInfoList": "Það eru engar sýndar skrár" + "EmptyFileInfoList": "Það eru engar sýndar skrár", + "Permission:AbpVirtualFileExplorer": "Sýndar skráarkönnuður", + "Permission:AbpVirtualFileExplorer:View": "Skoða" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/it.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/it.json similarity index 69% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/it.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/it.json index 7f51b3ad72..555f7ea620 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/it.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/it.json @@ -9,6 +9,8 @@ "FileContent": "Contenuto del file", "Size": "Dimensione", "BackToRoot": "Torna al principale", - "EmptyFileInfoList": "Non ci sono file virtuali" + "EmptyFileInfoList": "Non ci sono file virtuali", + "Permission:AbpVirtualFileExplorer": "Esplora file virtuale", + "Permission:AbpVirtualFileExplorer:View": "Visualizza" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/nl.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/nl.json similarity index 67% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/nl.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/nl.json index 4f00849893..8999b87ed3 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/nl.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/nl.json @@ -9,6 +9,8 @@ "FileContent": "Bestandsinhoud", "Size": "Grootte", "BackToRoot": "Terug naar hoofdmap", - "EmptyFileInfoList": "Er zijn geen virtuele bestanden" + "EmptyFileInfoList": "Er zijn geen virtuele bestanden", + "Permission:AbpVirtualFileExplorer": "Virtuele bestandsverkenner", + "Permission:AbpVirtualFileExplorer:View": "Bekijken" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/pl-PL.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/pl-PL.json similarity index 69% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/pl-PL.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/pl-PL.json index 3527bfbe02..09e6adad4e 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/pl-PL.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/pl-PL.json @@ -9,6 +9,8 @@ "FileContent": "Zawartość pliku", "Size": "Rozmiar", "BackToRoot": "Powrót do korzenia", - "EmptyFileInfoList": "Nie ma wirtualnych plików" + "EmptyFileInfoList": "Nie ma wirtualnych plików", + "Permission:AbpVirtualFileExplorer": "Wirtualny eksplorator plików", + "Permission:AbpVirtualFileExplorer:View": "Podgląd" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/pt-BR.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/pt-BR.json similarity index 69% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/pt-BR.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/pt-BR.json index f4b0675210..b59d281a1e 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/pt-BR.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/pt-BR.json @@ -9,6 +9,8 @@ "FileContent": "Conteúdo do arquivo", "Size": "Tamanho", "BackToRoot": "Voltar à raiz", - "EmptyFileInfoList": "Não há arquivos virtuais" + "EmptyFileInfoList": "Não há arquivos virtuais", + "Permission:AbpVirtualFileExplorer": "Explorador de arquivo virtual", + "Permission:AbpVirtualFileExplorer:View": "Visualizar" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/ro-RO.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/ro-RO.json similarity index 68% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/ro-RO.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/ro-RO.json index 67abc693a4..4acbd39fd9 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/ro-RO.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/ro-RO.json @@ -9,6 +9,8 @@ "FileContent" : "Conţinut fişier", "Size" : "Mărimea", "BackToRoot" : "Înapoi la rădăcină", - "EmptyFileInfoList" : "Nu există fişiere virtuale" + "EmptyFileInfoList" : "Nu există fişiere virtuale", + "Permission:AbpVirtualFileExplorer": "Explorator de fişiere virtuale", + "Permission:AbpVirtualFileExplorer:View": "Vizualizare" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/ru.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/ru.json similarity index 78% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/ru.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/ru.json index f616e7679b..a9ceb1e819 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/ru.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/ru.json @@ -9,6 +9,8 @@ "FileContent": "Содержание файла", "Size": "Размер", "BackToRoot": "Вернуться к корню", - "EmptyFileInfoList": "Нет виртуальных файлов" + "EmptyFileInfoList": "Нет виртуальных файлов", + "Permission:AbpVirtualFileExplorer": "Виртуальный файловый менеджер", + "Permission:AbpVirtualFileExplorer:View": "Просмотр" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/sk.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/sk.json similarity index 78% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/sk.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/sk.json index eaeb989d34..56815767d2 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/sk.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/sk.json @@ -9,6 +9,8 @@ "FileContent": "Obsah súboru", "Size": "Veľkosť", "BackToRoot": "Späť na koreňový priečinok", - "EmptyFileInfoList": "Neexistujú žiadne virtuálne súbory" + "EmptyFileInfoList": "Neexistujú žiadne virtuálne súbory", + "Permission:AbpVirtualFileExplorer": "Virtuálny prieskumník súborov", + "Permission:AbpVirtualFileExplorer:View": "Zobraziť" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/sl.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/sl.json similarity index 100% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/sl.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/sl.json diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/sv.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/sv.json similarity index 100% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/sv.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/sv.json diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/tr.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/tr.json similarity index 68% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/tr.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/tr.json index 30f659ff45..cb7c655a8a 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/tr.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/tr.json @@ -9,6 +9,8 @@ "FileContent": "Dosyaa içeriği", "Size": "Boyut", "BackToRoot": "Kök'e dön", - "EmptyFileInfoList": "Sanal dosyalar yok" + "EmptyFileInfoList": "Sanal dosyalar yok", + "Permission:AbpVirtualFileExplorer": "Sanal dosya gezgini", + "Permission:AbpVirtualFileExplorer:View": "Görüntüle" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/vi.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/vi.json similarity index 69% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/vi.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/vi.json index 71ff7b26ab..19b7e32e25 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/vi.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/vi.json @@ -9,6 +9,8 @@ "FileContent": "Nội dung tệp", "Size": "Kích thước", "BackToRoot": "Quay lại thư mục gốc", - "EmptyFileInfoList": "Không có tệp ảo nào" + "EmptyFileInfoList": "Không có tệp ảo nào", + "Permission:AbpVirtualFileExplorer": "Trình khám phá tệp ảo", + "Permission:AbpVirtualFileExplorer:View": "Xem" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/zh-Hans.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/zh-Hans.json similarity index 69% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/zh-Hans.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/zh-Hans.json index 46e5e4b811..824a8813f8 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/zh-Hans.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/zh-Hans.json @@ -9,6 +9,8 @@ "FileContent": "文件内容", "Size": "文件大小", "BackToRoot": "返回根目录", - "EmptyFileInfoList": "没有虚拟文件" + "EmptyFileInfoList": "没有虚拟文件", + "Permission:AbpVirtualFileExplorer": "虚拟文件资源管理器", + "Permission:AbpVirtualFileExplorer:View": "查看" } -} \ No newline at end of file +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/zh-Hant.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/zh-Hant.json similarity index 69% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/zh-Hant.json rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/zh-Hant.json index 1fb05fc6bf..4e293a3f25 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/zh-Hant.json +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/Resources/zh-Hant.json @@ -9,6 +9,8 @@ "FileContent" : "檔案內容", "Size" : "檔案大小", "BackToRoot" : "返回根目錄", - "EmptyFileInfoList" : "無任何虛擬檔案" + "EmptyFileInfoList" : "無任何虛擬檔案", + "Permission:AbpVirtualFileExplorer": "虛擬檔案總管", + "Permission:AbpVirtualFileExplorer:View": "檢視" } } diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/VirtualFileExplorerResource.cs b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/VirtualFileExplorerResource.cs similarity index 70% rename from modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/VirtualFileExplorerResource.cs rename to modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/VirtualFileExplorerResource.cs index 78f1e6eb4b..95fe949bd0 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/VirtualFileExplorerResource.cs +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/Localization/VirtualFileExplorerResource.cs @@ -1,6 +1,6 @@ using Volo.Abp.Localization; -namespace Volo.Abp.VirtualFileExplorer.Web.Localization; +namespace Volo.Abp.VirtualFileExplorer.Localization; [LocalizationResourceName("AbpVirtualFileExplorer")] public class VirtualFileExplorerResource diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/VirtualFileExplorerPermissions.cs b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/VirtualFileExplorerPermissions.cs new file mode 100644 index 0000000000..214a2e5663 --- /dev/null +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts/Volo/Abp/VirtualFileExplorer/VirtualFileExplorerPermissions.cs @@ -0,0 +1,15 @@ +using Volo.Abp.Reflection; + +namespace Volo.Abp.VirtualFileExplorer; + +public static class VirtualFileExplorerPermissions +{ + public const string GroupName = "AbpVirtualFileExplorer"; + + public const string View = GroupName + ".View"; + + public static string[] GetAll() + { + return ReflectionHelper.GetPublicConstantsRecursively(typeof(VirtualFileExplorerPermissions)); + } +} diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Installer/InstallationNotes.md b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Installer/InstallationNotes.md new file mode 100644 index 0000000000..9cc08c2ae7 --- /dev/null +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Installer/InstallationNotes.md @@ -0,0 +1,7 @@ +# Installation Notes for Virtual File Explorer Module + +The Virtual File System makes it possible to manage files that do not physically exist on the file system (disk). It's mainly used to embed (js, css, image..) files into assemblies and use them like physical files at runtime. + +## Documentation + +For detailed information and usage instructions, please visit the [Virtual File System Module documentation](https://abp.io/docs/latest/framework/infrastructure/virtual-file-system). \ No newline at end of file diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/AbpVirtualFileExplorerWebModule.cs b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/AbpVirtualFileExplorerWebModule.cs index 9bf9c7aa5d..6d2133844c 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/AbpVirtualFileExplorerWebModule.cs +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/AbpVirtualFileExplorerWebModule.cs @@ -1,4 +1,5 @@ -using Microsoft.Extensions.DependencyInjection; +using Localization; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.FileProviders.Physical; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; using Volo.Abp.AspNetCore.Mvc.UI.Bundling; @@ -8,8 +9,8 @@ using Volo.Abp.Localization; using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; using Volo.Abp.Validation.Localization; +using Volo.Abp.VirtualFileExplorer.Localization; using Volo.Abp.VirtualFileExplorer.Web.Bundling; -using Volo.Abp.VirtualFileExplorer.Web.Localization; using Volo.Abp.VirtualFileExplorer.Web.Navigation; using Volo.Abp.VirtualFileSystem; @@ -17,6 +18,7 @@ namespace Volo.Abp.VirtualFileExplorer.Web; [DependsOn(typeof(AbpAspNetCoreMvcUiBootstrapModule))] [DependsOn(typeof(AbpAspNetCoreMvcUiThemeSharedModule))] +[DependsOn(typeof(AbpVirtualFileExplorerContractsModule))] public class AbpVirtualFileExplorerWebModule : AbpModule { public override void PreConfigureServices(ServiceConfigurationContext context) @@ -43,14 +45,6 @@ public class AbpVirtualFileExplorerWebModule : AbpModule options.FileSets.AddEmbedded("Volo.Abp.VirtualFileExplorer.Web"); }); - Configure(options => - { - options.Resources - .Add("en") - .AddBaseTypes(typeof(AbpValidationResource)) - .AddVirtualJson("/Localization/Resources"); - }); - Configure(options => { options diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Navigation/VirtualFileExplorerMenuContributor.cs b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Navigation/VirtualFileExplorerMenuContributor.cs index a47f7585ad..45b8e2089e 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Navigation/VirtualFileExplorerMenuContributor.cs +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Navigation/VirtualFileExplorerMenuContributor.cs @@ -1,8 +1,10 @@ using System.Threading.Tasks; +using Localization; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Localization; +using Volo.Abp.Authorization.Permissions; using Volo.Abp.UI.Navigation; -using Volo.Abp.VirtualFileExplorer.Web.Localization; +using Volo.Abp.VirtualFileExplorer.Localization; namespace Volo.Abp.VirtualFileExplorer.Web.Navigation; @@ -17,7 +19,12 @@ public class VirtualFileExplorerMenuContributor : IMenuContributor var l = context.GetLocalizer(); - context.Menu.Items.Add(new ApplicationMenuItem(VirtualFileExplorerMenuNames.Index, l["Menu:VirtualFileExplorer"], icon: "fa fa-file", url: "~/VirtualFileExplorer")); + context.Menu.Items.Add(new ApplicationMenuItem( + VirtualFileExplorerMenuNames.Index, + l["Menu:VirtualFileExplorer"], + icon: "fa fa-file", url: "~/VirtualFileExplorer") + .RequirePermissions(VirtualFileExplorerPermissions.View) + ); return Task.CompletedTask; } diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/FileContentModal.cshtml b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/FileContentModal.cshtml index 7db9c4ca43..f25578f06e 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/FileContentModal.cshtml +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/FileContentModal.cshtml @@ -1,8 +1,9 @@ @page +@using Localization @using Microsoft.AspNetCore.Mvc.Localization @using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal @using Volo.Abp.AspNetCore.Mvc.UI.Packages.Prismjs -@using Volo.Abp.VirtualFileExplorer.Web.Localization +@using Volo.Abp.VirtualFileExplorer.Localization @model Volo.Abp.VirtualFileExplorer.Web.Pages.VirtualFileExplorer.FileContentModal @inject IHtmlLocalizer L @{ diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/FileContentModal.cshtml.cs b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/FileContentModal.cshtml.cs index 181028eabd..742038b31a 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/FileContentModal.cshtml.cs +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/FileContentModal.cshtml.cs @@ -1,6 +1,7 @@ using System; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.FileProviders; @@ -8,6 +9,7 @@ using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.VirtualFileExplorer.Web.Pages.VirtualFileExplorer; +[Authorize(VirtualFileExplorerPermissions.View)] public class FileContentModal : PageModel { [Required] diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/Index.cshtml b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/Index.cshtml index 83d6688252..bf5d86fa1a 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/Index.cshtml +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/Index.cshtml @@ -1,8 +1,9 @@ @page +@using Localization @using Localization.Resources.AbpUi @using Microsoft.AspNetCore.Mvc.Localization @using Volo.Abp.AspNetCore.Mvc.UI.Layout -@using Volo.Abp.VirtualFileExplorer.Web.Localization +@using Volo.Abp.VirtualFileExplorer.Localization @using Volo.Abp.VirtualFileExplorer.Web.Navigation @using Volo.Abp.VirtualFileExplorer.Web.Pages.VirtualFileExplorer @model IndexModel diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/Index.cshtml.cs b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/Index.cshtml.cs index fb8fab07c0..894332be84 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/Index.cshtml.cs +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/Index.cshtml.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.FileProviders; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination; @@ -11,6 +12,7 @@ using Volo.Abp.VirtualFileSystem.Embedded; namespace Volo.Abp.VirtualFileExplorer.Web.Pages.VirtualFileExplorer; +[Authorize(VirtualFileExplorerPermissions.View)] public class IndexModel : VirtualFileExplorerPageModel { [BindProperty(SupportsGet = true)] diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/VirtualFileExplorerPageModel.cs b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/VirtualFileExplorerPageModel.cs index d9423788b3..c9fd10a9a5 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/VirtualFileExplorerPageModel.cs +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Pages/VirtualFileExplorer/VirtualFileExplorerPageModel.cs @@ -1,5 +1,6 @@ -using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; -using Volo.Abp.VirtualFileExplorer.Web.Localization; +using Localization; +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; +using Volo.Abp.VirtualFileExplorer.Localization; namespace Volo.Abp.VirtualFileExplorer.Web.Pages.VirtualFileExplorer; diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Volo.Abp.VirtualFileExplorer.Web.csproj b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Volo.Abp.VirtualFileExplorer.Web.csproj index 362207b447..47454333bf 100644 --- a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Volo.Abp.VirtualFileExplorer.Web.csproj +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Volo.Abp.VirtualFileExplorer.Web.csproj @@ -16,6 +16,7 @@ + @@ -24,17 +25,11 @@ - - - - - - diff --git a/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-form/extensible-form-prop.component.html b/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-form/extensible-form-prop.component.html index b5da3a266f..b0d8f42bc7 100644 --- a/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-form/extensible-form-prop.component.html +++ b/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-form/extensible-form-prop.component.html @@ -22,7 +22,7 @@ /> } @case ('hidden') { - + } @case ('checkbox') {
@@ -62,24 +62,11 @@ } @case ('multiselect') { - + [abpDisabled]="disabled"/> } @case ('typeahead') { @@ -100,7 +87,7 @@ [class.is-invalid]="typeahead.classList.contains('is-invalid')" class="form-control" /> - +
} @case ('date') { @@ -122,7 +109,7 @@ } @case ('dateTime') { - + } @case ('textarea') { diff --git a/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-form/extensible-form-prop.component.ts b/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-form/extensible-form-prop.component.ts index d6e9dba268..401bd15c3d 100644 --- a/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-form/extensible-form-prop.component.ts +++ b/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-form/extensible-form-prop.component.ts @@ -49,12 +49,14 @@ import { NgxValidateCoreModule } from '@ngx-validate/core'; import { ExtensibleFormPropService } from '../../services/extensible-form-prop.service'; import { CommonModule } from '@angular/common'; import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'; +import { ExtensibleFormMultiselectComponent } from '../multi-select/extensible-form-multiselect.component'; @Component({ selector: 'abp-extensible-form-prop', templateUrl: './extensible-form-prop.component.html', imports: [ ExtensibleDateTimePickerComponent, + ExtensibleFormMultiselectComponent, NgbDatepickerModule, NgbTimepickerModule, ReactiveFormsModule, diff --git a/npm/ng-packs/packages/components/extensible/src/lib/components/index.ts b/npm/ng-packs/packages/components/extensible/src/lib/components/index.ts index 17f1c380d1..149043089b 100644 --- a/npm/ng-packs/packages/components/extensible/src/lib/components/index.ts +++ b/npm/ng-packs/packages/components/extensible/src/lib/components/index.ts @@ -5,3 +5,4 @@ export * from './extensible-table/extensible-table.component'; export * from './date-time-picker/extensible-date-time-picker.component'; export * from './grid-actions/grid-actions.component'; export * from './page-toolbar/page-toolbar.component'; +export * from './multi-select/extensible-form-multiselect.component'; diff --git a/npm/ng-packs/packages/components/extensible/src/lib/components/multi-select/extensible-form-multiselect.component.ts b/npm/ng-packs/packages/components/extensible/src/lib/components/multi-select/extensible-form-multiselect.component.ts new file mode 100644 index 0000000000..d55d55614d --- /dev/null +++ b/npm/ng-packs/packages/components/extensible/src/lib/components/multi-select/extensible-form-multiselect.component.ts @@ -0,0 +1,77 @@ +import { Component, ChangeDetectionStrategy, forwardRef, input } from '@angular/core'; +import { NG_VALUE_ACCESSOR, ControlValueAccessor, ReactiveFormsModule } from '@angular/forms'; +import { CommonModule } from '@angular/common'; +import { ABP, LocalizationModule } from '@abp/ng.core'; +import { FormProp } from '../../models/form-props'; + +const EXTENSIBLE_FORM_MULTI_SELECT_CONTROL_VALUE_ACCESSOR = { + provide: NG_VALUE_ACCESSOR, + useExisting: forwardRef(() => ExtensibleFormMultiselectComponent), + multi: true, +}; + +@Component({ + selector: 'abp-extensible-form-multi-select', + template: ` +
+ @for (option of options(); track option.value) { +
+ + @if (prop().isExtra) { + {{ '::' + option.key | abpLocalization }} + } @else { + {{ option.key }} + } +
+ } +
+ `, + providers: [EXTENSIBLE_FORM_MULTI_SELECT_CONTROL_VALUE_ACCESSOR], + imports: [LocalizationModule, CommonModule, ReactiveFormsModule], + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class ExtensibleFormMultiselectComponent implements ControlValueAccessor { + prop = input.required(); + options = input.required[]>(); + + selectedValues: any[] = []; + disabled = false; + + private onChange: (value: any) => void = () => {}; + private onTouched: () => void = () => {}; + + setDisabledState(isDisabled: boolean): void { + this.disabled = isDisabled; + } + + isChecked(value: any): boolean { + return this.selectedValues.includes(value); + } + + onCheckboxChange(value: any, checked: boolean): void { + this.selectedValues = checked + ? [...this.selectedValues, value] + : this.selectedValues.filter(item => item !== value); + + this.onChange(this.selectedValues); + this.onTouched(); + } + + writeValue(value: any[]): void { + this.selectedValues = Array.isArray(value) ? [...value] : []; + } + + registerOnChange(fn: any): void { + this.onChange = fn; + } + + registerOnTouched(fn: any): void { + this.onTouched = fn; + } +} diff --git a/npm/ng-packs/packages/components/extensible/src/lib/components/multi-select/index.ts b/npm/ng-packs/packages/components/extensible/src/lib/components/multi-select/index.ts new file mode 100644 index 0000000000..3a85d672ab --- /dev/null +++ b/npm/ng-packs/packages/components/extensible/src/lib/components/multi-select/index.ts @@ -0,0 +1 @@ +export * from './extensible-form-multiselect.component'; diff --git a/npm/ng-packs/packages/components/extensible/src/lib/extensible.module.ts b/npm/ng-packs/packages/components/extensible/src/lib/extensible.module.ts index 99bc25b6f4..26741c2832 100644 --- a/npm/ng-packs/packages/components/extensible/src/lib/extensible.module.ts +++ b/npm/ng-packs/packages/components/extensible/src/lib/extensible.module.ts @@ -16,6 +16,7 @@ import { GridActionsComponent, PageToolbarComponent, ExtensibleDateTimePickerComponent, + ExtensibleFormMultiselectComponent, } from './components'; import { PropDataDirective } from './directives/prop-data.directive'; import { CreateInjectorPipe } from './pipes/create-injector.pipe'; @@ -31,7 +32,9 @@ const importWithExport = [ CreateInjectorPipe, ExtensibleFormComponent, ExtensibleTableComponent, + ExtensibleFormMultiselectComponent, ]; + @NgModule({ declarations: [], imports: [ diff --git a/npm/ng-packs/packages/components/extensible/src/public-api.ts b/npm/ng-packs/packages/components/extensible/src/public-api.ts index 35e4696d49..e5c7883738 100644 --- a/npm/ng-packs/packages/components/extensible/src/public-api.ts +++ b/npm/ng-packs/packages/components/extensible/src/public-api.ts @@ -4,6 +4,7 @@ export * from './lib/components/extensible-form/extensible-form.component'; export * from './lib/components/extensible-table/extensible-table.component'; export * from './lib/components/grid-actions/grid-actions.component'; export * from './lib/components/page-toolbar/page-toolbar.component'; +export * from './lib/components/multi-select'; export * from './lib/constants/extra-properties'; export * from './lib/directives/prop-data.directive'; export * from './lib/enums/props.enum'; diff --git a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts index e26609bb25..fc71ad4a12 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts +++ b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts @@ -13,7 +13,7 @@ import { ToasterService, } from '@abp/ng.theme.shared'; import { Component, EventEmitter, Input, Output, inject } from '@angular/core'; -import { NgTemplateOutlet } from '@angular/common'; +import { CommonModule, NgTemplateOutlet } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import { finalize } from 'rxjs/operators'; @@ -31,6 +31,7 @@ enum ValueTypes { templateUrl: './feature-management.component.html', exportAs: 'abpFeatureManagement', imports: [ + CommonModule, ThemeSharedModule, LocalizationModule, FormsModule, diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index e60f374566..e2d65a631c 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -99,6 +99,7 @@ $projects = ( "framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect", "framework/src/Volo.Abp.AspNetCore.Abstractions", "framework/src/Volo.Abp.AspNetCore", + "framework/src/Volo.Abp.AspNetCore.Bundling", "framework/src/Volo.Abp.AspNetCore.Mvc.Dapr", "framework/src/Volo.Abp.AspNetCore.Mvc.Dapr.EventBus", "framework/src/Volo.Abp.AspNetCore.Components", @@ -111,6 +112,7 @@ $projects = ( "framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Bundling", "framework/src/Volo.Abp.AspNetCore.Components.Server", "framework/src/Volo.Abp.AspNetCore.Components.Server.Theming", + "framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Bundling", "framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming", "framework/src/Volo.Abp.AspNetCore.Components.MauiBlazor.Theming.Bundling", "framework/src/Volo.Abp.AspNetCore.MultiTenancy", @@ -442,6 +444,7 @@ $projects = ( "source-code/Volo.Abp.Users.SourceCode", # modules/virtual-file-explorer + "modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Contracts", "modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web", "modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Installer", "source-code/Volo.Abp.VirtualFileExplorer.SourceCode",