Browse Source

Merge branch 'dev' into dynamic-permissions

pull/13644/head
Halil İbrahim Kalkan 4 years ago
parent
commit
addc45f0e3
  1. 6
      .github/workflows/angular.yml
  2. 6
      .github/workflows/build-and-test.yml
  3. 94
      .github/workflows/codeql-analysis.yml
  4. 47
      .github/workflows/image-compression.yml
  5. 2
      abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json
  6. 2
      abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json
  7. 7
      abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json
  8. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/tr.json
  9. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json
  10. 22
      docs/en/CLI.md
  11. 12
      docs/en/Modules/OpenIddict.md
  12. 11
      docs/en/Modules/Setting-Management.md
  13. 4
      docs/en/docs-nav.json
  14. BIN
      docs/en/images/setting-management-email-ui.png
  15. 1
      docs/zh-Hans/CLI.md
  16. 8
      docs/zh-Hans/Modules/Setting-Management.md
  17. 4
      docs/zh-Hans/docs-nav.json
  18. BIN
      docs/zh-Hans/images/setting-management-email-ui.png
  19. 10
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs
  20. 6
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs
  21. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/TemplateCodeDeleteStep.cs
  22. 1
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs
  23. 7
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogAdminAppService.cs
  24. 7
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs
  25. 21
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs
  26. 3
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs
  27. 8
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/GlobalResources/GlobalResourceAdminAppService.cs
  28. 3
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/MediaDescriptors/MediaDescriptorAdminAppService.cs
  29. 9
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Menus/MenuItemAdminAppService.cs
  30. 5
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs
  31. 3
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/EntityTagAdminAppService.cs
  32. 9
      modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs
  33. 9
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs
  34. 9
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs
  35. 19
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogPostAdminController.cs
  36. 3
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs
  37. 7
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/GlobalResources/GlobalResourceAdminController.cs
  38. 7
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/MediaDescriptors/MediaDescriptorAdminController.cs
  39. 9
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Menus/MenuItemAdminController.cs
  40. 4
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Pages/PageAdminController.cs
  41. 7
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Tags/EntityTagAdminController.cs
  42. 10
      modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Tags/TagAdminController.cs
  43. 9
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Menus/CmsKitAdminMenuContributor.cs
  44. 1
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo.CmsKit.Domain.Shared.csproj
  45. 73
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Features/CmsKitFeatureDefinitionProvider.cs
  46. 15
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Features/CmsKitFeatures.cs
  47. 25
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json
  48. 21
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json
  49. 9
      modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogPostPublicAppService.cs
  50. 7
      modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Comments/CommentPublicAppService.cs
  51. 11
      modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/GlobalResources/GlobalResourcePublicAppService.cs
  52. 3
      modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Menus/MenuItemPublicAppService.cs
  53. 3
      modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs
  54. 7
      modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Ratings/RatingPublicAppService.cs
  55. 8
      modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Reactions/ReactionPublicAppService.cs
  56. 3
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogPostPublicController.cs
  57. 3
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Comments/CommentPublicController.cs
  58. 9
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/GlobalResources/GlobalResourcePublicController.cs
  59. 5
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Menus/MenuItemPublicController.cs
  60. 3
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs
  61. 3
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Ratings/RatingPublicController.cs
  62. 3
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Reactions/ReactionPublicController.cs
  63. 7
      modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Tags/TagPublicController.cs
  64. 6
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerBuilderOptions.cs
  65. 40
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs
  66. 6
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/AbpTenantManagementDomainSharedModule.cs
  67. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/ar.json
  68. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/de-DE.json
  69. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/en.json
  70. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/es.json
  71. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/fi.json
  72. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/fr.json
  73. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/hi.json
  74. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/it.json
  75. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/pt-BR.json
  76. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/ru.json
  77. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/sk.json
  78. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/sl.json
  79. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/tr.json
  80. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hans.json
  81. 1
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hant.json
  82. 2
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantManager.cs
  83. 4
      modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo/Abp/TenantManagement/TenantAppService_Tests.cs
  84. 4
      modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantManager_Tests.cs
  85. 2
      npm/ng-packs/.gitignore
  86. 4
      npm/ng-packs/package.json
  87. 4
      npm/ng-packs/packages/identity/src/lib/defaults/default-users-form-props.ts
  88. 1
      npm/ng-packs/packages/schematics/src/models/index.ts
  89. 3
      npm/ng-packs/packages/schematics/src/models/rule.ts
  90. 8
      npm/ng-packs/packages/schematics/src/utils/rule.ts
  91. 0
      npm/ng-packs/scripts/mock-schematic/api-definition.json
  92. 13
      npm/ng-packs/scripts/mock-schematic/mock-schematic-json.ts
  93. 22
      npm/ng-packs/scripts/mock-schematic/package.json
  94. 12
      npm/ng-packs/scripts/mock-schematic/tsconfig.json
  95. 3
      templates/console/src/MyCompanyName.MyProjectName/Program.cs

6
.github/workflows/angular.yml

@ -10,11 +10,17 @@ on:
branches: branches:
- 'rel-*' - 'rel-*'
- 'dev' - 'dev'
types:
- opened
- synchronize
- reopened
- ready_for_review
permissions: permissions:
contents: read contents: read
jobs: jobs:
build-test-lint: build-test-lint:
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

6
.github/workflows/build-and-test.yml

@ -31,12 +31,18 @@ on:
- 'templates/**/*.cshtml' - 'templates/**/*.cshtml'
- 'templates/**/*.csproj' - 'templates/**/*.csproj'
- 'templates/**/*.razor' - 'templates/**/*.razor'
types:
- opened
- synchronize
- reopened
- ready_for_review
permissions: permissions:
contents: read contents: read
jobs: jobs:
build-test: build-test:
runs-on: windows-latest runs-on: windows-latest
if: ${{ !github.event.pull_request.draft }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-dotnet@master - uses: actions/setup-dotnet@master

94
.github/workflows/codeql-analysis.yml

@ -9,26 +9,32 @@ on:
push: push:
branches: [dev, rel-*] branches: [dev, rel-*]
paths: paths:
- 'abp/**/*.js' - "abp/**/*.js"
- 'abp/**/*.cs' - "abp/**/*.cs"
- 'abp/**/*.cshtml' - "abp/**/*.cshtml"
- 'abp/**/*.csproj' - "abp/**/*.csproj"
- 'abp/**/*.razor' - "abp/**/*.razor"
pull_request: pull_request:
# The branches below must be a subset of the branches above # The branches below must be a subset of the branches above
branches: [dev] branches: [dev]
paths: paths:
- 'abp/**/*.js' - "abp/**/*.js"
- 'abp/**/*.cs' - "abp/**/*.cs"
- 'abp/**/*.cshtml' - "abp/**/*.cshtml"
- 'abp/**/*.csproj' - "abp/**/*.csproj"
- 'abp/**/*.razor' - "abp/**/*.razor"
types:
- opened
- synchronize
- reopened
- ready_for_review
permissions: permissions:
contents: read contents: read
jobs: jobs:
analyze: analyze:
if: ${{ !github.event.pull_request.draft }}
permissions: permissions:
actions: read # for github/codeql-action/init to get workflow details actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code contents: read # for actions/checkout to fetch code
@ -41,48 +47,48 @@ jobs:
matrix: matrix:
# Override automatic language detection by changing the below list # Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['csharp', 'javascript'] language: ["csharp", "javascript"]
# Learn more... # Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
# We must fetch at least the immediate parents so that if this is # We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head. # a pull request then we can checkout the head.
fetch-depth: 2 fetch-depth: 2
# If this run was triggered by a pull request event, then checkout # If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit. # the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2 - run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }} if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v1
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file. # By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file. # Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main # queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v1 uses: github/codeql-action/autobuild@v1
# ℹ️ Command-line programs to run using the OS shell. # ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl # 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project # and modify them (or add more) to build your code if your project
# uses a compiled language # uses a compiled language
#- run: | #- run: |
# make bootstrap # make bootstrap
# make release # make release
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v1

47
.github/workflows/image-compression.yml

@ -1,21 +1,26 @@
name: Compress Images name: Compress Images
on: on:
pull_request: pull_request:
paths: paths:
- '**.jpg' - "**.jpg"
- '**.jpeg' - "**.jpeg"
- '**.png' - "**.png"
- '**.webp' - "**.webp"
jobs: types:
build: - opened
if: github.event.pull_request.head.repo.full_name == github.repository - synchronize
name: calibreapp/image-actions - reopened
runs-on: ubuntu-latest - ready_for_review
steps: jobs:
- name: Checkout Repo build:
uses: actions/checkout@v2 if: github.event.pull_request.head.repo.full_name == github.repository && !github.event.pull_request.draft
name: calibreapp/image-actions
- name: Compress Images runs-on: ubuntu-latest
uses: calibreapp/image-actions@main steps:
with: - name: Checkout Repo
githubToken: ${{ secrets.GITHUB_TOKEN }} uses: actions/checkout@v2
- name: Compress Images
uses: calibreapp/image-actions@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}

2
abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json

@ -73,6 +73,7 @@
"DeveloperFocused": "Developer Focused", "DeveloperFocused": "Developer Focused",
"ShareYourExperiences": "Share your experiences with the ABP Framework", "ShareYourExperiences": "Share your experiences with the ABP Framework",
"LatestPosts": "Latest Posts", "LatestPosts": "Latest Posts",
"LatestVideos": "Latest Videos",
"Views": "Views", "Views": "Views",
"LearnLatestNewsAboutABPFramework": "Get information about happenings in ABP like new releases, free sources, posts, and more.", "LearnLatestNewsAboutABPFramework": "Get information about happenings in ABP like new releases, free sources, posts, and more.",
"DeveloperTools": "Developer Tools", "DeveloperTools": "Developer Tools",
@ -98,6 +99,7 @@
"Logout": "Logout", "Logout": "Logout",
"Home": "Home", "Home": "Home",
"Posts": "Posts", "Posts": "Posts",
"Videos": "Videos",
"JoinTheABPCommunity": "Join the ABP Community", "JoinTheABPCommunity": "Join the ABP Community",
"SubmitYourPost": "Submit Your Post", "SubmitYourPost": "Submit Your Post",
"Modules": "Modules", "Modules": "Modules",

2
abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json

@ -73,6 +73,7 @@
"DeveloperFocused": "以开发者为中心", "DeveloperFocused": "以开发者为中心",
"ShareYourExperiences": "分享您使用 ABP 框架的经验", "ShareYourExperiences": "分享您使用 ABP 框架的经验",
"LatestPosts": "最新的帖子", "LatestPosts": "最新的帖子",
"LatestVideos": "最新的视频",
"Views": "意见", "Views": "意见",
"LearnLatestNewsAboutABPFramework": "获取有关 ABP 的最新相关信息,例如新版本、免费资源、帖子等。", "LearnLatestNewsAboutABPFramework": "获取有关 ABP 的最新相关信息,例如新版本、免费资源、帖子等。",
"DeveloperTools": "开发者工具", "DeveloperTools": "开发者工具",
@ -98,6 +99,7 @@
"Logout": "登出", "Logout": "登出",
"Home": "主页", "Home": "主页",
"Posts": "帖子", "Posts": "帖子",
"Videos": "视频",
"JoinTheABPCommunity": "加入 ABP 社区", "JoinTheABPCommunity": "加入 ABP 社区",
"SubmitYourPost": "提交您的帖子", "SubmitYourPost": "提交您的帖子",
"Modules": "模块", "Modules": "模块",

7
abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json

@ -378,6 +378,13 @@
"IntroducingTheSolution": "Introducing the eShopOnAbp Solution", "IntroducingTheSolution": "Introducing the eShopOnAbp Solution",
"RunningTheSolution": "Running the Solution", "RunningTheSolution": "Running the Solution",
"UnderstandingTheAuthenticationSystem": "Understanding the Authentication System", "UnderstandingTheAuthenticationSystem": "Understanding the Authentication System",
"ExploringTheApplications": "Exploring the Applications",
"UnderstandingTheAPIGateways": "Understanding the API Gateways",
"DevelopingTheMicroservices": "Developing the Microservices",
"UnderstandingTheInfrastructure": "Understanding the Infrastructure",
"DiggingInTheUseCases": "Digging in the Use Cases",
"DeployingTheSolution": "Deploying the Solution",
"ThisBookIsInDraftStageAndIsNotCompletedYet": "This book is in draft stage and is not completed yet.",
"Authors": "Authors", "Authors": "Authors",
"MicroserviceEBook": "Microservice E-Book", "MicroserviceEBook": "Microservice E-Book",
"SelectUITheme": "Select UI Theme", "SelectUITheme": "Select UI Theme",

3
abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/tr.json

@ -279,6 +279,7 @@
"SubscribeToNewsletter": "ABP.IO Platform'u ile ilgili yeni haberler, makaleler, teklifler ve daha fazlası gibi gelişmeler hakkında bilgi almak için bültene abone olun.", "SubscribeToNewsletter": "ABP.IO Platform'u ile ilgili yeni haberler, makaleler, teklifler ve daha fazlası gibi gelişmeler hakkında bilgi almak için bültene abone olun.",
"FirstEdition": "İlk Baskı", "FirstEdition": "İlk Baskı",
"ThankYou": "Teşekkürler!", "ThankYou": "Teşekkürler!",
"CheckboxMandatory": "Devam etmek için bunu kontrol etmeniz gerekiyor!" "CheckboxMandatory": "Devam etmek için bunu kontrol etmeniz gerekiyor!",
"ThisBookIsInDraftStageAndIsNotCompletedYet": "Bu kitap taslak aşamasındadır ve henüz tamamlanmamıştır."
} }
} }

3
abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json

@ -372,6 +372,7 @@
"MasteringAbpFramework_Book_What_You_Will_Learn_8": "使用 ABP 框架编写单元、集成和 UI 测试。", "MasteringAbpFramework_Book_What_You_Will_Learn_8": "使用 ABP 框架编写单元、集成和 UI 测试。",
"MasteringAbpFramework_Book_WhoIsThisBookFor": "这本书是给谁看的", "MasteringAbpFramework_Book_WhoIsThisBookFor": "这本书是给谁看的",
"MasteringAbpFramework_Book_WhoIsThisBookFor_Description": "本书适用于希望学习软件架构和最佳实践的 Web 开发人员,以使用 Microsoft 技术和 ABP 框架构建\n 可维护的基于 Web 的解决方案。 C#\n 和 ASP.NET Core 的基本知识是开始阅读本书所必需的。", "MasteringAbpFramework_Book_WhoIsThisBookFor_Description": "本书适用于希望学习软件架构和最佳实践的 Web 开发人员,以使用 Microsoft 技术和 ABP 框架构建\n 可维护的基于 Web 的解决方案。 C#\n 和 ASP.NET Core 的基本知识是开始阅读本书所必需的。",
"ComputersAndTechnology": "计算机与技术" "ComputersAndTechnology": "计算机与技术",
"ThisBookIsInDraftStageAndIsNotCompletedYet": "这本书正在草案阶段,还没有完成。"
} }
} }

22
docs/en/CLI.md

@ -124,7 +124,7 @@ For more samples, go to [ABP CLI Create Solution Samples](CLI-New-Command-Sample
* `--separate-auth-server`: The Identity Server project comes as a separate project and runs at a different endpoint. It separates the Identity Server from the API Host application. If not specified, you will have a single endpoint in the server side. * `--separate-auth-server`: The Identity Server project comes as a separate project and runs at a different endpoint. It separates the Identity Server from the API Host application. If not specified, you will have a single endpoint in the server side.
* `--mobile` or `-m`: Specifies the mobile application framework. If not specified, no mobile application will be created. Available options: * `--mobile` or `-m`: Specifies the mobile application framework. If not specified, no mobile application will be created. Available options:
* `react-native`: React Native. * `react-native`: React Native.
* `maui`: MAUI. * `maui`: MAUI. This mobile option is only available for ABP Commercial.
* `--database-provider` or `-d`: Specifies the database provider. Default provider is `ef`. Available providers: * `--database-provider` or `-d`: Specifies the database provider. Default provider is `ef`. Available providers:
* `ef`: Entity Framework Core. * `ef`: Entity Framework Core.
* `mongodb`: MongoDB. * `mongodb`: MongoDB.
@ -145,7 +145,8 @@ For more samples, go to [ABP CLI Create Solution Samples](CLI-New-Command-Sample
* `mongodb`: MongoDB. * `mongodb`: MongoDB.
* `--theme`: Specifes the theme. Default theme is `leptonx-lite`. Available themes: * `--theme`: Specifes the theme. Default theme is `leptonx-lite`. Available themes:
* `leptonx-lite`: [LeptonX Lite Theme](/Themes/LeptonXLite/mvc.md). * `leptonx-lite`: [LeptonX Lite Theme](/Themes/LeptonXLite/mvc.md).
* `basic`: [Basic Theme](/UI/AspNetCore/Basic-Theme.md). * `basic`: [Basic Theme](/UI/AspNetCore/Basic-Theme.md).
* **`maui`**: .NET MAUI. A minimalist .NET MAUI application will be created if you specify this option.
* `--output-folder` or `-o`: Specifies the output folder. Default value is the current directory. * `--output-folder` or `-o`: Specifies the output folder. Default value is the current directory.
* `--version` or `-v`: Specifies the ABP & template version. It can be a [release tag](https://github.com/abpframework/abp/releases) or a [branch name](https://github.com/abpframework/abp/branches). Uses the latest release if not specified. Most of the times, you will want to use the latest version. * `--version` or `-v`: Specifies the ABP & template version. It can be a [release tag](https://github.com/abpframework/abp/releases) or a [branch name](https://github.com/abpframework/abp/branches). Uses the latest release if not specified. Most of the times, you will want to use the latest version.
* `--preview`: Use latest preview version. * `--preview`: Use latest preview version.
@ -161,6 +162,7 @@ For more samples, go to [ABP CLI Create Solution Samples](CLI-New-Command-Sample
* `PostgreSQL` * `PostgreSQL`
* `--local-framework-ref --abp-path`: Uses local projects references to the ABP framework instead of using the NuGet packages. This can be useful if you download the ABP Framework source code and have a local reference to the framework from your application. * `--local-framework-ref --abp-path`: Uses local projects references to the ABP framework instead of using the NuGet packages. This can be useful if you download the ABP Framework source code and have a local reference to the framework from your application.
* `--no-random-port`: Uses template's default ports. * `--no-random-port`: Uses template's default ports.
* `--skip-installing-libs` or `-sib`: Skip installing client side packages.
See some [examples for the new command](CLI-New-Command-Samples.md) here. See some [examples for the new command](CLI-New-Command-Samples.md) here.
@ -244,7 +246,7 @@ It can also create a new module for your solution and add it to your solution. S
> A business module generally consists of several packages (because of layering, different database provider options or other reasons). Using `add-module` command dramatically simplifies adding a module to a solution. However, each module may require some additional configurations which is generally indicated in the documentation of the related module. > A business module generally consists of several packages (because of layering, different database provider options or other reasons). Using `add-module` command dramatically simplifies adding a module to a solution. However, each module may require some additional configurations which is generally indicated in the documentation of the related module.
Usage Usage:
````bash ````bash
abp add-module <module-name> [options] abp add-module <module-name> [options]
@ -278,7 +280,7 @@ abp add-module ProductManagement --new --add-to-solution-file
Lists names of open-source application modules. Lists names of open-source application modules.
Usage Usage:
````bash ````bash
abp list-modules [options] abp list-modules [options]
@ -294,11 +296,21 @@ abp list-modules
* `--include-pro-modules`: Includes commercial (pro) modules in the output. * `--include-pro-modules`: Includes commercial (pro) modules in the output.
### list-templates
Lists all available templates to create a solution.
Usage:
```bash
abp list-templates
```
### get-source ### get-source
Downloads the source code of a module to your computer. Downloads the source code of a module to your computer.
Usage Usage:
````bash ````bash
abp get-source <module-name> [options] abp get-source <module-name> [options]

12
docs/en/Modules/OpenIddict.md

@ -4,6 +4,14 @@
This module implements the domain logic and database integrations, but not provides any UI. Management UI is useful if you need to add applications and scopes on the fly. In this case, you may build the management UI yourself or consider to purchase the [ABP Commercial](https://commercial.abp.io/) which provides the management UI for this module. This module implements the domain logic and database integrations, but not provides any UI. Management UI is useful if you need to add applications and scopes on the fly. In this case, you may build the management UI yourself or consider to purchase the [ABP Commercial](https://commercial.abp.io/) which provides the management UI for this module.
## How to Install
This module comes as pre-installed (as NuGet/NPM packages) when you [create a new solution](https://abp.io/get-started) with the ABP Framework. You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module.
### The Source Code
The source code of this module can be accessed [here](https://github.com/abpframework/abp/tree/dev/modules/openiddict). The source code is licensed with [MIT](https://choosealicense.com/licenses/mit/), so you can freely use and customize it.
## Relations to Other Modules ## Relations to Other Modules
This module is based on the [Identity Module](Identity.md) and have an [integration package](https://www.nuget.org/packages/Volo.Abp.Account.Web.OpenIddict) with the [Account Module](Account.md). This module is based on the [Identity Module](Identity.md) and have an [integration package](https://www.nuget.org/packages/Volo.Abp.Account.Web.OpenIddict) with the [Account Module](Account.md).
@ -206,6 +214,10 @@ If you need to customize OpenIddict, you need to replace/delete/add new handlers
Please refer to: Please refer to:
https://documentation.openiddict.com/guides/index.html#events-model https://documentation.openiddict.com/guides/index.html#events-model
## Migrating Guide
[Migrating from IdentityServer to OpenIddict Step by Step Guide ](../Migration-Guides/OpenIddict-Step-by-Step.md)
## Sponsor ## Sponsor
Please consider sponsoring this project: https://github.com/sponsors/kevinchalet Please consider sponsoring this project: https://github.com/sponsors/kevinchalet

11
docs/en/Modules/Setting-Management.md

@ -118,7 +118,13 @@ The order of the providers are important. Providers are executed in the reverse
## Setting Management UI ## Setting Management UI
Setting Mangement module provided the email setting UI by default, and it is extensible; You can add your tabs to this page for your application settings. Setting Mangement module provided the email setting UI by default.
![EmailSettingUi](../images/setting-management-email-ui.png)
> You can click the Send test email button to send a test email to check your email settings.
Setting it is extensible; You can add your tabs to this page for your application settings.
### MVC UI ### MVC UI
@ -302,5 +308,4 @@ export class AppComponent {
Navigate to `/setting-management` route to see the changes: Navigate to `/setting-management` route to see the changes:
![Custom Settings Tab](../images/custom-settings.png) ![Custom Settings Tab](../images/custom-settings.png)

4
docs/en/docs-nav.json

@ -43,6 +43,10 @@
"text": "WPF Application", "text": "WPF Application",
"path": "Startup-Templates/WPF.md" "path": "Startup-Templates/WPF.md"
}, },
{
"text": "MAUI",
"path": "Startup-Templates/MAUI.md"
},
{ {
"text": "Empty Web Project", "text": "Empty Web Project",
"path": "Getting-Started-AspNetCore-Application.md" "path": "Getting-Started-AspNetCore-Application.md"

BIN
docs/en/images/setting-management-email-ui.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

1
docs/zh-Hans/CLI.md

@ -123,6 +123,7 @@ abp new Acme.BookStore
* `module`: [Module template](Startup-Templates/Module.md). 其他选项: * `module`: [Module template](Startup-Templates/Module.md). 其他选项:
* `--no-ui`: 不包含UI.仅创建服务模块(也称为微服务 - 没有UI). * `--no-ui`: 不包含UI.仅创建服务模块(也称为微服务 - 没有UI).
* **`console`**: [Console template](Startup-Templates/Console.md). * **`console`**: [Console template](Startup-Templates/Console.md).
* **`maui`**: [Maui template](Startup-Templates/MAUI.md).
* **`app-nolayers`**: 应用程序单层模板 * **`app-nolayers`**: 应用程序单层模板
* `--ui` 或者 `-u`: 指定ui框架.默认`mvc`框架.其他选项: * `--ui` 或者 `-u`: 指定ui框架.默认`mvc`框架.其他选项:
* `mvc`: ASP.NET Core MVC. * `mvc`: ASP.NET Core MVC.

8
docs/zh-Hans/Modules/Setting-Management.md

@ -87,7 +87,13 @@ namespace Demo
## Setting Management UI. ## Setting Management UI.
设置管理模块默认提供了邮件设置页面并且它是可扩展的; 你可以为你的应用程序设置添加设置标签到设置页面. 设置管理模块默认提供了邮件设置页面.
![EmailSettingUi](../images/setting-management-email-ui.png)
> 你可以点击发送测试邮件按钮发送一封测试邮件来检查你的邮件设置.
设置UI是可扩展的; 你可以为你的应用程序设置添加设置标签到设置页面.
### MVC UI ### MVC UI

4
docs/zh-Hans/docs-nav.json

@ -61,6 +61,10 @@
{ {
"text": "WPF", "text": "WPF",
"path": "Startup-Templates/WPF.md" "path": "Startup-Templates/WPF.md"
},
{
"text": "MAUI",
"path": "Startup-Templates/MAUI.md"
} }
] ]
}, },

BIN
docs/zh-Hans/images/setting-management-email-ui.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

10
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs

@ -85,7 +85,13 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
ConfigureNpmPackagesForTheme(projectArgs); ConfigureNpmPackagesForTheme(projectArgs);
await RunGraphBuildForMicroserviceServiceTemplate(projectArgs); await RunGraphBuildForMicroserviceServiceTemplate(projectArgs);
await CreateInitialMigrationsAsync(projectArgs); await CreateInitialMigrationsAsync(projectArgs);
await RunInstallLibsForWebTemplateAsync(projectArgs);
var skipInstallLibs = commandLineArgs.Options.ContainsKey(Options.SkipInstallingLibs.Long) || commandLineArgs.Options.ContainsKey(Options.SkipInstallingLibs.Short);
if (!skipInstallLibs)
{
await RunInstallLibsForWebTemplateAsync(projectArgs);
}
await ConfigurePwaSupportForAngular(projectArgs); await ConfigurePwaSupportForAngular(projectArgs);
OpenRelatedWebPage(projectArgs, template, isTiered, commandLineArgs); OpenRelatedWebPage(projectArgs, template, isTiered, commandLineArgs);
@ -117,7 +123,7 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
sb.AppendLine("--tiered (if supported by the template)"); sb.AppendLine("--tiered (if supported by the template)");
sb.AppendLine("--no-ui (if supported by the template)"); sb.AppendLine("--no-ui (if supported by the template)");
sb.AppendLine("--no-random-port (Use template's default ports)"); sb.AppendLine("--no-random-port (Use template's default ports)");
sb.AppendLine("--separate-auth-server (if supported by the template)"); sb.AppendLine("--separate-identity-server (if supported by the template)");
sb.AppendLine("--local-framework-ref --abp-path <your-local-abp-repo-path> (keeps local references to projects instead of replacing with NuGet package references)"); sb.AppendLine("--local-framework-ref --abp-path <your-local-abp-repo-path> (keeps local references to projects instead of replacing with NuGet package references)");
sb.AppendLine(""); sb.AppendLine("");
sb.AppendLine("Examples:"); sb.AppendLine("Examples:");

6
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs

@ -709,6 +709,12 @@ public abstract class ProjectCreationCommandBase
public const string Long = "create-solution-folder"; public const string Long = "create-solution-folder";
} }
public static class SkipInstallingLibs
{
public const string Short = "sib";
public const string Long = "skip-installing-libs";
}
public static class Tiered public static class Tiered
{ {
public const string Long = "tiered"; public const string Long = "tiered";

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/TemplateCodeDeleteStep.cs

@ -14,6 +14,8 @@ public class TemplateCodeDeleteStep : ProjectBuildPipelineStep
file.Name.EndsWith(".json") || file.Name.EndsWith(".json") ||
file.Name.EndsWith(".gitignore") || file.Name.EndsWith(".gitignore") ||
file.Name.EndsWith(".yml") || file.Name.EndsWith(".yml") ||
file.Name.EndsWith(".yaml") ||
file.Name.EndsWith(".md") ||
file.Name.EndsWith(".ps1") || file.Name.EndsWith(".ps1") ||
file.Name.EndsWith(".html") || file.Name.EndsWith(".html") ||
file.Name.EndsWith(".ts") || file.Name.EndsWith(".ts") ||

1
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs

@ -489,6 +489,7 @@ public class SolutionModuleAdder : ITransientDependency
args.Options.Add("t", newProTemplate ? ModuleProTemplate.TemplateName : ModuleTemplate.TemplateName); args.Options.Add("t", newProTemplate ? ModuleProTemplate.TemplateName : ModuleTemplate.TemplateName);
args.Options.Add("v", version); args.Options.Add("v", version);
args.Options.Add("o", Path.Combine(modulesFolderInSolution, module.Name)); args.Options.Add("o", Path.Combine(modulesFolderInSolution, module.Name));
args.Options.Add("sib", true.ToString());
await NewCommand.ExecuteAsync(args); await NewCommand.ExecuteAsync(args);
} }

7
modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogAdminAppService.cs

@ -1,16 +1,19 @@
using Microsoft.AspNetCore.Authorization; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Blogs; using Volo.CmsKit.Blogs;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.Blogs; namespace Volo.CmsKit.Admin.Blogs;
[RequiresFeature(CmsKitFeatures.BlogEnable)]
[RequiresGlobalFeature(typeof(BlogsFeature))] [RequiresGlobalFeature(typeof(BlogsFeature))]
[Authorize(CmsKitAdminPermissions.Blogs.Default)] [Authorize(CmsKitAdminPermissions.Blogs.Default)]
public class BlogAdminAppService : CmsKitAdminAppServiceBase, IBlogAdminAppService public class BlogAdminAppService : CmsKitAdminAppServiceBase, IBlogAdminAppService

7
modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminAppService.cs

@ -1,15 +1,18 @@
using Microsoft.AspNetCore.Authorization; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.EventBus.Distributed; using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Blogs; using Volo.CmsKit.Blogs;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.Blogs; namespace Volo.CmsKit.Admin.Blogs;
[RequiresFeature(CmsKitFeatures.BlogEnable)]
[RequiresGlobalFeature(typeof(BlogsFeature))] [RequiresGlobalFeature(typeof(BlogsFeature))]
[Authorize(CmsKitAdminPermissions.Blogs.Features)] [Authorize(CmsKitAdminPermissions.Blogs.Features)]
public class BlogFeatureAdminAppService : CmsKitAdminAppServiceBase, IBlogFeatureAdminAppService public class BlogFeatureAdminAppService : CmsKitAdminAppServiceBase, IBlogFeatureAdminAppService

21
modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Blogs/BlogPostAdminAppService.cs

@ -1,19 +1,22 @@
using Microsoft.AspNetCore.Authorization; using System;
using System;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.Abp.Users; using Volo.Abp.Users;
using Volo.CmsKit.Admin.MediaDescriptors; using Volo.CmsKit.Admin.MediaDescriptors;
using Volo.CmsKit.Blogs; using Volo.CmsKit.Blogs;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
using Volo.CmsKit.Users; using Volo.CmsKit.Users;
namespace Volo.CmsKit.Admin.Blogs; namespace Volo.CmsKit.Admin.Blogs;
[RequiresFeature(CmsKitFeatures.BlogEnable)]
[RequiresGlobalFeature(typeof(BlogsFeature))] [RequiresGlobalFeature(typeof(BlogsFeature))]
[Authorize(CmsKitAdminPermissions.BlogPosts.Default)] [Authorize(CmsKitAdminPermissions.BlogPosts.Default)]
public class BlogPostAdminAppService : CmsKitAppServiceBase, IBlogPostAdminAppService public class BlogPostAdminAppService : CmsKitAppServiceBase, IBlogPostAdminAppService
@ -66,18 +69,18 @@ public class BlogPostAdminAppService : CmsKitAppServiceBase, IBlogPostAdminAppSe
public virtual async Task<BlogPostDto> UpdateAsync(Guid id, UpdateBlogPostDto input) public virtual async Task<BlogPostDto> UpdateAsync(Guid id, UpdateBlogPostDto input)
{ {
var blogPost = await BlogPostRepository.GetAsync(id); var blogPost = await BlogPostRepository.GetAsync(id);
blogPost.SetTitle(input.Title); blogPost.SetTitle(input.Title);
blogPost.SetShortDescription(input.ShortDescription); blogPost.SetShortDescription(input.ShortDescription);
blogPost.SetContent(input.Content); blogPost.SetContent(input.Content);
blogPost.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp); blogPost.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp);
if (blogPost.CoverImageMediaId != null && input.CoverImageMediaId == null) if (blogPost.CoverImageMediaId != null && input.CoverImageMediaId == null)
{ {
await MediaDescriptorAdminAppService.DeleteAsync(blogPost.CoverImageMediaId.Value); await MediaDescriptorAdminAppService.DeleteAsync(blogPost.CoverImageMediaId.Value);
} }
blogPost.CoverImageMediaId = input.CoverImageMediaId; blogPost.CoverImageMediaId = input.CoverImageMediaId;
if (blogPost.Slug != input.Slug) if (blogPost.Slug != input.Slug)
{ {
await BlogPostManager.SetSlugUrlAsync(blogPost, input.Slug); await BlogPostManager.SetSlugUrlAsync(blogPost, input.Slug);
@ -146,12 +149,12 @@ public class BlogPostAdminAppService : CmsKitAppServiceBase, IBlogPostAdminAppSe
{ {
var blogPost = await CreateAsync(input); var blogPost = await CreateAsync(input);
await CurrentUnitOfWork.SaveChangesAsync(); await CurrentUnitOfWork.SaveChangesAsync();
await PublishAsync(blogPost.Id); await PublishAsync(blogPost.Id);
blogPost.Status = BlogPostStatus.Published; blogPost.Status = BlogPostStatus.Published;
return blogPost; return blogPost;
} }
[Authorize(CmsKitAdminPermissions.BlogPosts.Create)] [Authorize(CmsKitAdminPermissions.BlogPosts.Create)]
public virtual async Task SendToReviewAsync(Guid id) public virtual async Task SendToReviewAsync(Guid id)
{ {
@ -159,13 +162,13 @@ public class BlogPostAdminAppService : CmsKitAppServiceBase, IBlogPostAdminAppSe
blogPost.SetWaitingForReview(); blogPost.SetWaitingForReview();
await BlogPostRepository.UpdateAsync(blogPost); await BlogPostRepository.UpdateAsync(blogPost);
} }
[Authorize(CmsKitAdminPermissions.BlogPosts.Create)] [Authorize(CmsKitAdminPermissions.BlogPosts.Create)]
public virtual async Task<BlogPostDto> CreateAndSendToReviewAsync(CreateBlogPostDto input) public virtual async Task<BlogPostDto> CreateAndSendToReviewAsync(CreateBlogPostDto input)
{ {
var blogPost = await CreateAsync(input); var blogPost = await CreateAsync(input);
await CurrentUnitOfWork.SaveChangesAsync(); await CurrentUnitOfWork.SaveChangesAsync();
await SendToReviewAsync(blogPost.Id); await SendToReviewAsync(blogPost.Id);
blogPost.Status = BlogPostStatus.WaitingForReview; blogPost.Status = BlogPostStatus.WaitingForReview;
return blogPost; return blogPost;

3
modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Comments/CommentAdminAppService.cs

@ -3,14 +3,17 @@ using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Comments; using Volo.CmsKit.Comments;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
using Volo.CmsKit.Users; using Volo.CmsKit.Users;
namespace Volo.CmsKit.Admin.Comments; namespace Volo.CmsKit.Admin.Comments;
[RequiresFeature(CmsKitFeatures.CommentEnable)]
[RequiresGlobalFeature(typeof(CommentsFeature))] [RequiresGlobalFeature(typeof(CommentsFeature))]
[Authorize(CmsKitAdminPermissions.Comments.Default)] [Authorize(CmsKitAdminPermissions.Comments.Default)]
public class CommentAdminAppService : CmsKitAdminAppServiceBase, ICommentAdminAppService public class CommentAdminAppService : CmsKitAdminAppServiceBase, ICommentAdminAppService

8
modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/GlobalResources/GlobalResourceAdminAppService.cs

@ -1,13 +1,16 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.GlobalResources; using Volo.CmsKit.GlobalResources;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.GlobalResources; namespace Volo.CmsKit.Admin.GlobalResources;
[RequiresFeature(CmsKitFeatures.GlobalResourceEnable)]
[RequiresGlobalFeature(typeof(GlobalResourcesFeature))] [RequiresGlobalFeature(typeof(GlobalResourcesFeature))]
[Authorize(CmsKitAdminPermissions.GlobalResources.Default)] [Authorize(CmsKitAdminPermissions.GlobalResources.Default)]
public class GlobalResourceAdminAppService : ApplicationService, IGlobalResourceAdminAppService public class GlobalResourceAdminAppService : ApplicationService, IGlobalResourceAdminAppService
@ -18,10 +21,11 @@ public class GlobalResourceAdminAppService : ApplicationService, IGlobalResource
{ {
GlobalResourceManager = globalResourceManager; GlobalResourceManager = globalResourceManager;
} }
public async Task<GlobalResourcesDto> GetAsync() public async Task<GlobalResourcesDto> GetAsync()
{ {
return new GlobalResourcesDto { return new GlobalResourcesDto
{
StyleContent = (await GlobalResourceManager.GetGlobalStyleAsync()).Value, StyleContent = (await GlobalResourceManager.GetGlobalStyleAsync()).Value,
ScriptContent = (await GlobalResourceManager.GetGlobalScriptAsync()).Value ScriptContent = (await GlobalResourceManager.GetGlobalScriptAsync()).Value
}; };

3
modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/MediaDescriptors/MediaDescriptorAdminAppService.cs

@ -1,12 +1,15 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.BlobStoring; using Volo.Abp.BlobStoring;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.MediaDescriptors; using Volo.CmsKit.MediaDescriptors;
namespace Volo.CmsKit.Admin.MediaDescriptors; namespace Volo.CmsKit.Admin.MediaDescriptors;
[RequiresFeature(CmsKitFeatures.MediaEnable)]
[RequiresGlobalFeature(typeof(MediaFeature))] [RequiresGlobalFeature(typeof(MediaFeature))]
public class MediaDescriptorAdminAppService : CmsKitAdminAppServiceBase, IMediaDescriptorAdminAppService public class MediaDescriptorAdminAppService : CmsKitAdminAppServiceBase, IMediaDescriptorAdminAppService
{ {

9
modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Menus/MenuItemAdminAppService.cs

@ -1,12 +1,12 @@
using Microsoft.AspNetCore.Authorization; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Menus; using Volo.CmsKit.Menus;
using Volo.CmsKit.Pages; using Volo.CmsKit.Pages;
@ -14,6 +14,7 @@ using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.Menus; namespace Volo.CmsKit.Admin.Menus;
[RequiresFeature(CmsKitFeatures.MenuEnable)]
[RequiresGlobalFeature(typeof(MenuFeature))] [RequiresGlobalFeature(typeof(MenuFeature))]
[Authorize(CmsKitAdminPermissions.Menus.Default)] [Authorize(CmsKitAdminPermissions.Menus.Default)]
public class MenuItemAdminAppService : CmsKitAdminAppServiceBase, IMenuItemAdminAppService public class MenuItemAdminAppService : CmsKitAdminAppServiceBase, IMenuItemAdminAppService

5
modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs

@ -1,18 +1,19 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using AutoMapper;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Admin.Menus; using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Pages; using Volo.CmsKit.Pages;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.Pages; namespace Volo.CmsKit.Admin.Pages;
[RequiresFeature(CmsKitFeatures.PageEnable)]
[RequiresGlobalFeature(typeof(PagesFeature))] [RequiresGlobalFeature(typeof(PagesFeature))]
[Authorize(CmsKitAdminPermissions.Pages.Default)] [Authorize(CmsKitAdminPermissions.Pages.Default)]
public class PageAdminAppService : CmsKitAdminAppServiceBase, IPageAdminAppService public class PageAdminAppService : CmsKitAdminAppServiceBase, IPageAdminAppService

3
modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/EntityTagAdminAppService.cs

@ -1,10 +1,13 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Tags; using Volo.CmsKit.Tags;
namespace Volo.CmsKit.Admin.Tags; namespace Volo.CmsKit.Admin.Tags;
[RequiresFeature(CmsKitFeatures.TagEnable)]
[RequiresGlobalFeature(typeof(TagsFeature))] [RequiresGlobalFeature(typeof(TagsFeature))]
public class EntityTagAdminAppService : CmsKitAdminAppServiceBase, IEntityTagAdminAppService public class EntityTagAdminAppService : CmsKitAdminAppServiceBase, IEntityTagAdminAppService
{ {

9
modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs

@ -1,18 +1,21 @@
using Microsoft.AspNetCore.Authorization; using System;
using Microsoft.Extensions.Localization;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.Localization;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
using Volo.CmsKit.Tags; using Volo.CmsKit.Tags;
namespace Volo.CmsKit.Admin.Tags; namespace Volo.CmsKit.Admin.Tags;
[RequiresFeature(CmsKitFeatures.TagEnable)]
[Authorize(CmsKitAdminPermissions.Tags.Default)] [Authorize(CmsKitAdminPermissions.Tags.Default)]
[RequiresGlobalFeature(typeof(TagsFeature))] [RequiresGlobalFeature(typeof(TagsFeature))]
public class TagAdminAppService : CmsKitAppServiceBase, ITagAdminAppService public class TagAdminAppService : CmsKitAppServiceBase, ITagAdminAppService

9
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogAdminController.cs

@ -1,15 +1,18 @@
using Microsoft.AspNetCore.Authorization; using System;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.Blogs; namespace Volo.CmsKit.Admin.Blogs;
[RequiresFeature(CmsKitFeatures.BlogEnable)]
[RequiresGlobalFeature(typeof(BlogsFeature))] [RequiresGlobalFeature(typeof(BlogsFeature))]
[RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitAdminRemoteServiceConsts.ModuleName)] [Area(CmsKitAdminRemoteServiceConsts.ModuleName)]

9
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogFeatureAdminController.cs

@ -1,16 +1,19 @@
using Microsoft.AspNetCore.Authorization; using System;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Blogs; using Volo.CmsKit.Blogs;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.Blogs; namespace Volo.CmsKit.Admin.Blogs;
[RequiresFeature(CmsKitFeatures.BlogEnable)]
[RequiresGlobalFeature(typeof(BlogsFeature))] [RequiresGlobalFeature(typeof(BlogsFeature))]
[RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitAdminRemoteServiceConsts.ModuleName)] [Area(CmsKitAdminRemoteServiceConsts.ModuleName)]

19
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Blogs/BlogPostAdminController.cs

@ -1,15 +1,18 @@
using Microsoft.AspNetCore.Authorization; using System;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.Blogs; namespace Volo.CmsKit.Admin.Blogs;
[RequiresFeature(CmsKitFeatures.BlogEnable)]
[RequiresGlobalFeature(typeof(BlogsFeature))] [RequiresGlobalFeature(typeof(BlogsFeature))]
[RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitAdminRemoteServiceConsts.ModuleName)] [Area(CmsKitAdminRemoteServiceConsts.ModuleName)]
@ -61,7 +64,7 @@ public class BlogPostAdminController : CmsKitAdminController, IBlogPostAdminAppS
{ {
return BlogPostAdminAppService.UpdateAsync(id, input); return BlogPostAdminAppService.UpdateAsync(id, input);
} }
[HttpPost] [HttpPost]
[Route("{id}/publish")] [Route("{id}/publish")]
[Authorize(CmsKitAdminPermissions.BlogPosts.Publish)] [Authorize(CmsKitAdminPermissions.BlogPosts.Publish)]
@ -69,7 +72,7 @@ public class BlogPostAdminController : CmsKitAdminController, IBlogPostAdminAppS
{ {
return BlogPostAdminAppService.PublishAsync(id); return BlogPostAdminAppService.PublishAsync(id);
} }
[HttpPost] [HttpPost]
[Route("{id}/draft")] [Route("{id}/draft")]
[Authorize(CmsKitAdminPermissions.BlogPosts.Update)] [Authorize(CmsKitAdminPermissions.BlogPosts.Update)]
@ -86,7 +89,7 @@ public class BlogPostAdminController : CmsKitAdminController, IBlogPostAdminAppS
{ {
return BlogPostAdminAppService.CreateAndPublishAsync(input); return BlogPostAdminAppService.CreateAndPublishAsync(input);
} }
[HttpPost] [HttpPost]
[Route("{id}/send-to-review")] [Route("{id}/send-to-review")]
[Authorize(CmsKitAdminPermissions.BlogPosts.Create)] [Authorize(CmsKitAdminPermissions.BlogPosts.Create)]
@ -94,7 +97,7 @@ public class BlogPostAdminController : CmsKitAdminController, IBlogPostAdminAppS
{ {
return BlogPostAdminAppService.SendToReviewAsync(id); return BlogPostAdminAppService.SendToReviewAsync(id);
} }
[HttpPost] [HttpPost]
[Route("create-and-send-to-review")] [Route("create-and-send-to-review")]
[Authorize(CmsKitAdminPermissions.BlogPosts.Create)] [Authorize(CmsKitAdminPermissions.BlogPosts.Create)]
@ -102,7 +105,7 @@ public class BlogPostAdminController : CmsKitAdminController, IBlogPostAdminAppS
{ {
return BlogPostAdminAppService.CreateAndSendToReviewAsync(input); return BlogPostAdminAppService.CreateAndSendToReviewAsync(input);
} }
[HttpGet] [HttpGet]
[Route("has-blogpost-waiting-for-review")] [Route("has-blogpost-waiting-for-review")]
[Authorize(CmsKitAdminPermissions.BlogPosts.Publish)] [Authorize(CmsKitAdminPermissions.BlogPosts.Publish)]

3
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Comments/CommentAdminController.cs

@ -4,12 +4,15 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.Comments; namespace Volo.CmsKit.Admin.Comments;
[RequiresFeature(CmsKitFeatures.CommentEnable)]
[Authorize(CmsKitAdminPermissions.Comments.Default)] [Authorize(CmsKitAdminPermissions.Comments.Default)]
[RequiresGlobalFeature(typeof(CommentsFeature))] [RequiresGlobalFeature(typeof(CommentsFeature))]
[RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)]

7
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/GlobalResources/GlobalResourceAdminController.cs

@ -2,18 +2,21 @@
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.GlobalResources; namespace Volo.CmsKit.Admin.GlobalResources;
[RequiresFeature(CmsKitFeatures.GlobalResourceEnable)]
[RequiresGlobalFeature(typeof(GlobalResourcesFeature))] [RequiresGlobalFeature(typeof(GlobalResourcesFeature))]
[RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitAdminRemoteServiceConsts.ModuleName)] [Area(CmsKitAdminRemoteServiceConsts.ModuleName)]
[Authorize(CmsKitAdminPermissions.Menus.Default)] [Authorize(CmsKitAdminPermissions.Menus.Default)]
[Route("api/cms-kit-admin/global-resources")] [Route("api/cms-kit-admin/global-resources")]
public class GlobalResourceAdminController: CmsKitAdminController, IGlobalResourceAdminAppService public class GlobalResourceAdminController : CmsKitAdminController, IGlobalResourceAdminAppService
{ {
private readonly IGlobalResourceAdminAppService _globalResourceAdminAppService; private readonly IGlobalResourceAdminAppService _globalResourceAdminAppService;
@ -21,7 +24,7 @@ public class GlobalResourceAdminController: CmsKitAdminController, IGlobalResour
{ {
_globalResourceAdminAppService = globalResourceAdminAppService; _globalResourceAdminAppService = globalResourceAdminAppService;
} }
[HttpGet] [HttpGet]
public Task<GlobalResourcesDto> GetAsync() public Task<GlobalResourcesDto> GetAsync()
{ {

7
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/MediaDescriptors/MediaDescriptorAdminController.cs

@ -1,16 +1,15 @@
using System; using System;
using System.Net;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.MediaDescriptors; namespace Volo.CmsKit.Admin.MediaDescriptors;
[RequiresFeature(CmsKitFeatures.MediaEnable)]
[RequiresGlobalFeature(typeof(MediaFeature))] [RequiresGlobalFeature(typeof(MediaFeature))]
[RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitAdminRemoteServiceConsts.ModuleName)] [Area(CmsKitAdminRemoteServiceConsts.ModuleName)]

9
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Menus/MenuItemAdminController.cs

@ -1,16 +1,19 @@
using Microsoft.AspNetCore.Authorization; using System;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Menus; using Volo.CmsKit.Menus;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.Menus; namespace Volo.CmsKit.Admin.Menus;
[RequiresFeature(CmsKitFeatures.MenuEnable)]
[RequiresGlobalFeature(typeof(MenuFeature))] [RequiresGlobalFeature(typeof(MenuFeature))]
[RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitAdminRemoteServiceConsts.ModuleName)] [Area(CmsKitAdminRemoteServiceConsts.ModuleName)]

4
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Pages/PageAdminController.cs

@ -4,13 +4,15 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Admin.Menus; using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.Pages; namespace Volo.CmsKit.Admin.Pages;
[RequiresFeature(CmsKitFeatures.PageEnable)]
[RequiresGlobalFeature(typeof(PagesFeature))] [RequiresGlobalFeature(typeof(PagesFeature))]
[RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitAdminRemoteServiceConsts.ModuleName)] [Area(CmsKitAdminRemoteServiceConsts.ModuleName)]

7
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Tags/EntityTagAdminController.cs

@ -1,13 +1,14 @@
using Microsoft.AspNetCore.Authorization; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions;
namespace Volo.CmsKit.Admin.Tags; namespace Volo.CmsKit.Admin.Tags;
[RequiresFeature(CmsKitFeatures.TagEnable)]
[RequiresGlobalFeature(typeof(TagsFeature))] [RequiresGlobalFeature(typeof(TagsFeature))]
[RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitAdminRemoteServiceConsts.ModuleName)] [Area(CmsKitAdminRemoteServiceConsts.ModuleName)]

10
modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Tags/TagAdminController.cs

@ -1,18 +1,20 @@
using Microsoft.AspNetCore.Authorization; using System;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Admin.Tags; using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
using Volo.CmsKit.Tags; using Volo.CmsKit.Tags;
namespace Volo.CmsKit.Admin.Tags; namespace Volo.CmsKit.Admin.Tags;
[RequiresFeature(CmsKitFeatures.TagEnable)]
[RequiresGlobalFeature(typeof(TagsFeature))] [RequiresGlobalFeature(typeof(TagsFeature))]
[RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitAdminRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitAdminRemoteServiceConsts.ModuleName)] [Area(CmsKitAdminRemoteServiceConsts.ModuleName)]

9
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Menus/CmsKitAdminMenuContributor.cs

@ -2,8 +2,10 @@
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Authorization.Permissions; using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.Abp.UI.Navigation; using Volo.Abp.UI.Navigation;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Localization; using Volo.CmsKit.Localization;
using Volo.CmsKit.Permissions; using Volo.CmsKit.Permissions;
@ -36,6 +38,7 @@ public class CmsKitAdminMenuContributor : IMenuContributor
l["Pages"].Value, l["Pages"].Value,
"/Cms/Pages", "/Cms/Pages",
"fa fa-file-alt") "fa fa-file-alt")
.RequireFeatures(CmsKitFeatures.PageEnable)
.RequireGlobalFeatures(typeof(PagesFeature)) .RequireGlobalFeatures(typeof(PagesFeature))
.RequirePermissions(CmsKitAdminPermissions.Pages.Default)); .RequirePermissions(CmsKitAdminPermissions.Pages.Default));
@ -44,6 +47,7 @@ public class CmsKitAdminMenuContributor : IMenuContributor
l["Blogs"], l["Blogs"],
"/Cms/Blogs", "/Cms/Blogs",
"fa fa-blog") "fa fa-blog")
.RequireFeatures(CmsKitFeatures.BlogEnable)
.RequireGlobalFeatures(typeof(BlogsFeature)) .RequireGlobalFeatures(typeof(BlogsFeature))
.RequirePermissions(CmsKitAdminPermissions.Blogs.Default)); .RequirePermissions(CmsKitAdminPermissions.Blogs.Default));
@ -52,6 +56,7 @@ public class CmsKitAdminMenuContributor : IMenuContributor
l["BlogPosts"], l["BlogPosts"],
"/Cms/BlogPosts", "/Cms/BlogPosts",
"fa fa-file-signature") "fa fa-file-signature")
.RequireFeatures(CmsKitFeatures.BlogEnable)
.RequireGlobalFeatures(typeof(BlogsFeature)) .RequireGlobalFeatures(typeof(BlogsFeature))
.RequirePermissions(CmsKitAdminPermissions.BlogPosts.Default)); .RequirePermissions(CmsKitAdminPermissions.BlogPosts.Default));
@ -60,6 +65,7 @@ public class CmsKitAdminMenuContributor : IMenuContributor
l["Tags"].Value, l["Tags"].Value,
"/Cms/Tags", "/Cms/Tags",
"fa fa-tags") "fa fa-tags")
.RequireFeatures(CmsKitFeatures.TagEnable)
.RequireGlobalFeatures(typeof(TagsFeature)) .RequireGlobalFeatures(typeof(TagsFeature))
.RequirePermissions(CmsKitAdminPermissions.Tags.Default)); .RequirePermissions(CmsKitAdminPermissions.Tags.Default));
@ -68,6 +74,7 @@ public class CmsKitAdminMenuContributor : IMenuContributor
l["Comments"].Value, l["Comments"].Value,
"/Cms/Comments", "/Cms/Comments",
"fa fa-comments") "fa fa-comments")
.RequireFeatures(CmsKitFeatures.CommentEnable)
.RequireGlobalFeatures(typeof(CommentsFeature)) .RequireGlobalFeatures(typeof(CommentsFeature))
.RequirePermissions(CmsKitAdminPermissions.Comments.Default)); .RequirePermissions(CmsKitAdminPermissions.Comments.Default));
@ -76,6 +83,7 @@ public class CmsKitAdminMenuContributor : IMenuContributor
l["Menus"], l["Menus"],
"/Cms/Menus/Items", "/Cms/Menus/Items",
"fa fa-stream") "fa fa-stream")
.RequireFeatures(CmsKitFeatures.MenuEnable)
.RequireGlobalFeatures(typeof(MenuFeature)) .RequireGlobalFeatures(typeof(MenuFeature))
.RequirePermissions(CmsKitAdminPermissions.Menus.Default)); .RequirePermissions(CmsKitAdminPermissions.Menus.Default));
@ -84,6 +92,7 @@ public class CmsKitAdminMenuContributor : IMenuContributor
l["GlobalResources"], l["GlobalResources"],
"/Cms/GlobalResources", "/Cms/GlobalResources",
"fa fa-newspaper") "fa fa-newspaper")
.RequireFeatures(CmsKitFeatures.GlobalResourceEnable)
.RequireGlobalFeatures(typeof(GlobalResourcesFeature)) .RequireGlobalFeatures(typeof(GlobalResourcesFeature))
.RequirePermissions(CmsKitAdminPermissions.GlobalResources.Default)); .RequirePermissions(CmsKitAdminPermissions.GlobalResources.Default));

1
modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo.CmsKit.Domain.Shared.csproj

@ -12,6 +12,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Validation\Volo.Abp.Validation.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Validation\Volo.Abp.Validation.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.GlobalFeatures\Volo.Abp.GlobalFeatures.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.GlobalFeatures\Volo.Abp.GlobalFeatures.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Features\Volo.Abp.Features.csproj" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.5" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.5" />
</ItemGroup> </ItemGroup>

73
modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Features/CmsKitFeatureDefinitionProvider.cs

@ -0,0 +1,73 @@
using Volo.Abp.Features;
using Volo.Abp.Localization;
using Volo.Abp.Validation.StringValues;
using Volo.CmsKit.Localization;
namespace Volo.CmsKit.Features;
public class CmsKitFeatureDefinitionProvider : FeatureDefinitionProvider
{
public override void Define(IFeatureDefinitionContext context)
{
var group = context.AddGroup(CmsKitFeatures.GroupName,
L("Feature:CmsKitGroup"));
group.AddFeature(CmsKitFeatures.BlogEnable,
"true",
L("Feature:BlogEnable"),
L("Feature:BlogEnableDescription"),
new ToggleStringValueType());
group.AddFeature(CmsKitFeatures.CommentEnable,
"true",
L("Feature:CommentEnable"),
L("Feature:CommentEnableDescription"),
new ToggleStringValueType());
group.AddFeature(CmsKitFeatures.GlobalResourceEnable,
"true",
L("Feature:GlobalResourceEnable"),
L("Feature:GlobalResourceEnableDescription"),
new ToggleStringValueType());
group.AddFeature(CmsKitFeatures.MediaEnable,
"true",
L("Feature:MediaEnable"),
L("Feature:MediaEnableDescription"),
new ToggleStringValueType());
group.AddFeature(CmsKitFeatures.MenuEnable,
"true",
L("Feature:MenuEnable"),
L("Feature:MenuEnableDescription"),
new ToggleStringValueType());
group.AddFeature(CmsKitFeatures.PageEnable,
"true",
L("Feature:PageEnable"),
L("Feature:PageEnableDescription"),
new ToggleStringValueType());
group.AddFeature(CmsKitFeatures.RatingEnable,
"true",
L("Feature:RatingEnable"),
L("Feature:RatingEnableDescription"),
new ToggleStringValueType());
group.AddFeature(CmsKitFeatures.ReactionEnable,
"true",
L("Feature:ReactionEnable"),
L("Feature:ReactionEnableDescription"),
new ToggleStringValueType());
group.AddFeature(CmsKitFeatures.TagEnable,
"true",
L("Feature:TagEnable"),
L("Feature:TagEnableDescription"),
new ToggleStringValueType());
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<CmsKitResource>(name);
}
}

15
modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Features/CmsKitFeatures.cs

@ -0,0 +1,15 @@
namespace Volo.CmsKit.Features;
public static class CmsKitFeatures
{
public const string GroupName = "CmsKit";
public const string BlogEnable = GroupName + ".BlogEnable";
public const string CommentEnable = GroupName + ".CommentEnable";
public const string GlobalResourceEnable = GroupName + ".GlobalResourceEnable";
public const string MediaEnable = GroupName + ".MediaEnable";
public const string MenuEnable = GroupName + ".MenuEnable";
public const string PageEnable = GroupName + ".PageEnable";
public const string RatingEnable = GroupName + ".RatingEnable";
public const string ReactionEnable = GroupName + ".ReactionEnable";
public const string TagEnable = GroupName + ".TagEnable";
}

25
modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json

@ -185,8 +185,27 @@
"Add": "Add", "Add": "Add",
"AddWidget": "Add Widget", "AddWidget": "Add Widget",
"PleaseConfigureWidgets": "Please configure widgets", "PleaseConfigureWidgets": "Please configure widgets",
"SelectAnAuthor":"Select an Author", "SelectAnAuthor": "Select an Author",
"InThisDocument":"In This Document", "InThisDocument": "In This Document",
"GoToTop":"Go To Top" "GoToTop": "Go To Top",
"Feature:CmsKitGroup": "Cms Kit",
"Feature:BlogEnable": "Enabled blog page",
"Feature:BlogEnableDescription": "Enable blog page in the application.",
"Feature:CommentEnable": "Enabled commenting",
"Feature:CommentEnableDescription": "Enable comment in the application.",
"Feature:GlobalResourceEnable": "Enabled global resourcing",
"Feature:GlobalResourceEnableDescription": "Enable global resource in the application.",
"Feature:MediaEnable": "Enabled media",
"Feature:MediaEnableDescription": "Enable media in the application.",
"Feature:MenuEnable": "Enabled menu",
"Feature:MenuEnableDescription": "Enable menu in the application.",
"Feature:PageEnable": "Enabled paging page",
"Feature:PageEnableDescription": "Enable paging page in the application.",
"Feature:RatingEnable": "Enabled rating",
"Feature:RatingEnableDescription": "Enable rating in the application.",
"Feature:ReactionEnable": "Enabled reaction",
"Feature:ReactionEnableDescription": "Enable reaction in the application.",
"Feature:TagEnable": "Enabled taging",
"Feature:TagEnableDescription": "Enable taging in the application."
} }
} }

21
modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json

@ -190,6 +190,25 @@
"CmsKit.BlogPost.ScrollIndex": "Blog yazılarında hızlı gezinme çubuğu", "CmsKit.BlogPost.ScrollIndex": "Blog yazılarında hızlı gezinme çubuğu",
"Add": "Ekle", "Add": "Ekle",
"AddWidget": "Widget Ekle", "AddWidget": "Widget Ekle",
"PleaseConfigureWidgets": "Lütfen widget'leri yapılandırın" "PleaseConfigureWidgets": "Lütfen widget'leri yapılandırın",
"Feature:CmsKitGroup": "Cms Kit",
"Feature:BlogEnable": "Blog sayfasını etkinleştirin",
"Feature:BlogEnableDescription": "Uygulamınızdaki blog sayfasını etkinleştirir.",
"Feature:CommentEnable": "Yorum özelliğini etkinleştirin",
"Feature:CommentEnableDescription": "Uygulamınızdaki yorum özelliğini etkinleştirir.",
"Feature:GlobalResourceEnable": "Blog global kaynakları etkinleştirin",
"Feature:GlobalResourceEnableDescription": "Uygulamınızdaki global kaynakları etkinleştirir.",
"Feature:MediaEnable": "Medyayı etkinleştirin",
"Feature:MediaEnableDescription": "Uygulamınızdaki medyayı etkinleştirir.",
"Feature:MenuEnable": "Menüyü etkinleştirin",
"Feature:MenuEnableDescription": "Uygulamınızdaki menüyü etkinleştirir.",
"Feature:PageEnable": "Sayfa özelliğini etkinleştirin",
"Feature:PageEnableDescription": "Uygulamınızdaki sayfa özelliğini etkinleştirir.",
"Feature:RatingEnable": "Oylamayı etkinleştirin",
"Feature:RatingEnableDescription": "Uygulamınızdaki oylamayı etkinleştirir.",
"Feature:ReactionEnable": "Reaksiyonları etkinleştirin",
"Feature:ReactionEnableDescription": "Uygulamınızdaki reaksiyonları etkinleştirir.",
"Feature:TagEnable": "Etkiketleri etkinleştirin",
"Feature:TagEnableDescription": "Uygulamınızdaki etiketleri etkinleştirir."
} }
} }

9
modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogPostPublicAppService.cs

@ -1,16 +1,19 @@
using JetBrains.Annotations; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using JetBrains.Annotations;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Blogs; using Volo.CmsKit.Blogs;
using Volo.CmsKit.Contents; using Volo.CmsKit.Contents;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Users; using Volo.CmsKit.Users;
namespace Volo.CmsKit.Public.Blogs; namespace Volo.CmsKit.Public.Blogs;
[RequiresFeature(CmsKitFeatures.BlogEnable)]
[RequiresGlobalFeature(typeof(BlogsFeature))] [RequiresGlobalFeature(typeof(BlogsFeature))]
public class BlogPostPublicAppService : CmsKitPublicAppServiceBase, IBlogPostPublicAppService public class BlogPostPublicAppService : CmsKitPublicAppServiceBase, IBlogPostPublicAppService
{ {
@ -38,7 +41,7 @@ public class BlogPostPublicAppService : CmsKitPublicAppServiceBase, IBlogPostPub
var blogPostDto = ObjectMapper.Map<BlogPost, BlogPostCommonDto>(blogPost); var blogPostDto = ObjectMapper.Map<BlogPost, BlogPostCommonDto>(blogPost);
blogPostDto.ContentFragments = await ContentParser.ParseAsync(blogPost.Content); blogPostDto.ContentFragments = await ContentParser.ParseAsync(blogPost.Content);
return blogPostDto; return blogPostDto;
} }

7
modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Comments/CommentPublicAppService.cs

@ -1,20 +1,23 @@
using Microsoft.AspNetCore.Authorization; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Authorization; using Volo.Abp.Authorization;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.EventBus.Distributed; using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.Abp.Users; using Volo.Abp.Users;
using Volo.CmsKit.Comments; using Volo.CmsKit.Comments;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Users; using Volo.CmsKit.Users;
namespace Volo.CmsKit.Public.Comments; namespace Volo.CmsKit.Public.Comments;
[RequiresFeature(CmsKitFeatures.CommentEnable)]
[RequiresGlobalFeature(typeof(CommentsFeature))] [RequiresGlobalFeature(typeof(CommentsFeature))]
public class CommentPublicAppService : CmsKitPublicAppServiceBase, ICommentPublicAppService public class CommentPublicAppService : CmsKitPublicAppServiceBase, ICommentPublicAppService
{ {

11
modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/GlobalResources/GlobalResourcePublicAppService.cs

@ -1,11 +1,14 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.GlobalResources; using Volo.CmsKit.GlobalResources;
namespace Volo.CmsKit.Public.GlobalResources; namespace Volo.CmsKit.Public.GlobalResources;
[RequiresFeature(CmsKitFeatures.GlobalResourceEnable)]
[RequiresGlobalFeature(typeof(GlobalResourcesFeature))] [RequiresGlobalFeature(typeof(GlobalResourcesFeature))]
public class GlobalResourcePublicAppService : ApplicationService, IGlobalResourcePublicAppService public class GlobalResourcePublicAppService : ApplicationService, IGlobalResourcePublicAppService
{ {
@ -15,18 +18,18 @@ public class GlobalResourcePublicAppService : ApplicationService, IGlobalResourc
{ {
GlobalResourceManager = globalResourceManager; GlobalResourceManager = globalResourceManager;
} }
public async Task<GlobalResourceDto> GetGlobalScriptAsync() public async Task<GlobalResourceDto> GetGlobalScriptAsync()
{ {
var globalScript = await GlobalResourceManager.GetGlobalScriptAsync(); var globalScript = await GlobalResourceManager.GetGlobalScriptAsync();
return ObjectMapper.Map<GlobalResource, GlobalResourceDto>(globalScript); return ObjectMapper.Map<GlobalResource, GlobalResourceDto>(globalScript);
} }
public async Task<GlobalResourceDto> GetGlobalStyleAsync() public async Task<GlobalResourceDto> GetGlobalStyleAsync()
{ {
var globalStyle = await GlobalResourceManager.GetGlobalStyleAsync(); var globalStyle = await GlobalResourceManager.GetGlobalStyleAsync();
return ObjectMapper.Map<GlobalResource, GlobalResourceDto>(globalStyle); return ObjectMapper.Map<GlobalResource, GlobalResourceDto>(globalStyle);
} }
} }

3
modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Menus/MenuItemPublicAppService.cs

@ -1,12 +1,15 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Menus; using Volo.CmsKit.Menus;
namespace Volo.CmsKit.Public.Menus; namespace Volo.CmsKit.Public.Menus;
[RequiresFeature(CmsKitFeatures.MenuEnable)]
[RequiresGlobalFeature(typeof(MenuFeature))] [RequiresGlobalFeature(typeof(MenuFeature))]
public class MenuItemPublicAppService : CmsKitPublicAppServiceBase, IMenuItemPublicAppService public class MenuItemPublicAppService : CmsKitPublicAppServiceBase, IMenuItemPublicAppService
{ {

3
modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs

@ -1,11 +1,14 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Contents; using Volo.CmsKit.Contents;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Pages; using Volo.CmsKit.Pages;
namespace Volo.CmsKit.Public.Pages; namespace Volo.CmsKit.Public.Pages;
[RequiresFeature(CmsKitFeatures.PageEnable)]
[RequiresGlobalFeature(typeof(PagesFeature))] [RequiresGlobalFeature(typeof(PagesFeature))]
public class PagePublicAppService : CmsKitPublicAppServiceBase, IPagePublicAppService public class PagePublicAppService : CmsKitPublicAppServiceBase, IPagePublicAppService
{ {

7
modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Ratings/RatingPublicAppService.cs

@ -1,15 +1,18 @@
using Microsoft.AspNetCore.Authorization; using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Authorization; using Volo.Abp.Authorization;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.Abp.Users; using Volo.Abp.Users;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Ratings; using Volo.CmsKit.Ratings;
using Volo.CmsKit.Users; using Volo.CmsKit.Users;
namespace Volo.CmsKit.Public.Ratings; namespace Volo.CmsKit.Public.Ratings;
[RequiresFeature(CmsKitFeatures.RatingEnable)]
[RequiresGlobalFeature(typeof(RatingsFeature))] [RequiresGlobalFeature(typeof(RatingsFeature))]
public class RatingPublicAppService : CmsKitPublicAppServiceBase, IRatingPublicAppService public class RatingPublicAppService : CmsKitPublicAppServiceBase, IRatingPublicAppService
{ {

8
modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Reactions/ReactionPublicAppService.cs

@ -1,17 +1,19 @@
using Microsoft.AspNetCore.Authorization; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Linq.Dynamic.Core; using System.Linq.Dynamic.Core;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.Abp.Users; using Volo.Abp.Users;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Reactions; using Volo.CmsKit.Reactions;
namespace Volo.CmsKit.Public.Reactions; namespace Volo.CmsKit.Public.Reactions;
[RequiresFeature(CmsKitFeatures.ReactionEnable)]
[RequiresGlobalFeature(typeof(ReactionsFeature))] [RequiresGlobalFeature(typeof(ReactionsFeature))]
public class ReactionPublicAppService : CmsKitPublicAppServiceBase, IReactionPublicAppService public class ReactionPublicAppService : CmsKitPublicAppServiceBase, IReactionPublicAppService
{ {

3
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Blogs/BlogPostPublicController.cs

@ -3,13 +3,16 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Contents; using Volo.CmsKit.Contents;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Users; using Volo.CmsKit.Users;
namespace Volo.CmsKit.Public.Blogs; namespace Volo.CmsKit.Public.Blogs;
[RequiresFeature(CmsKitFeatures.BlogEnable)]
[RequiresGlobalFeature(typeof(BlogsFeature))] [RequiresGlobalFeature(typeof(BlogsFeature))]
[RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitPublicRemoteServiceConsts.ModuleName)] [Area(CmsKitPublicRemoteServiceConsts.ModuleName)]

3
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Comments/CommentPublicController.cs

@ -3,11 +3,14 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
namespace Volo.CmsKit.Public.Comments; namespace Volo.CmsKit.Public.Comments;
[RequiresFeature(CmsKitFeatures.CommentEnable)]
[RequiresGlobalFeature(typeof(CommentsFeature))] [RequiresGlobalFeature(typeof(CommentsFeature))]
[RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitPublicRemoteServiceConsts.ModuleName)] [Area(CmsKitPublicRemoteServiceConsts.ModuleName)]

9
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/GlobalResources/GlobalResourcePublicController.cs

@ -1,16 +1,19 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
namespace Volo.CmsKit.Public.GlobalResources; namespace Volo.CmsKit.Public.GlobalResources;
[RequiresFeature(CmsKitFeatures.GlobalResourceEnable)]
[RequiresGlobalFeature(typeof(GlobalResourcesFeature))] [RequiresGlobalFeature(typeof(GlobalResourcesFeature))]
[RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitPublicRemoteServiceConsts.ModuleName)] [Area(CmsKitPublicRemoteServiceConsts.ModuleName)]
[Route("api/cms-kit-public/global-resources")] [Route("api/cms-kit-public/global-resources")]
public class GlobalResourcePublicController: CmsKitPublicControllerBase, IGlobalResourcePublicAppService public class GlobalResourcePublicController : CmsKitPublicControllerBase, IGlobalResourcePublicAppService
{ {
private readonly IGlobalResourcePublicAppService _globalResourcePublicAppService; private readonly IGlobalResourcePublicAppService _globalResourcePublicAppService;
@ -18,14 +21,14 @@ public class GlobalResourcePublicController: CmsKitPublicControllerBase, IGlobal
{ {
_globalResourcePublicAppService = globalResourcePublicAppService; _globalResourcePublicAppService = globalResourcePublicAppService;
} }
[HttpGet] [HttpGet]
[Route("script")] [Route("script")]
public Task<GlobalResourceDto> GetGlobalScriptAsync() public Task<GlobalResourceDto> GetGlobalScriptAsync()
{ {
return _globalResourcePublicAppService.GetGlobalScriptAsync(); return _globalResourcePublicAppService.GetGlobalScriptAsync();
} }
[HttpGet] [HttpGet]
[Route("style")] [Route("style")]
public Task<GlobalResourceDto> GetGlobalStyleAsync() public Task<GlobalResourceDto> GetGlobalStyleAsync()

5
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Menus/MenuItemPublicController.cs

@ -2,13 +2,16 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Menus; using Volo.CmsKit.Menus;
namespace Volo.CmsKit.Public.Menus; namespace Volo.CmsKit.Public.Menus;
[RequiresGlobalFeature(typeof(BlogsFeature))] [RequiresFeature(CmsKitFeatures.MenuEnable)]
[RequiresGlobalFeature(typeof(MenuFeature))]
[RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitPublicRemoteServiceConsts.ModuleName)] [Area(CmsKitPublicRemoteServiceConsts.ModuleName)]
[Route("api/cms-kit-public/menu-items")] [Route("api/cms-kit-public/menu-items")]

3
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs

@ -1,12 +1,15 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Contents; using Volo.CmsKit.Contents;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
namespace Volo.CmsKit.Public.Pages; namespace Volo.CmsKit.Public.Pages;
[RequiresFeature(CmsKitFeatures.PageEnable)]
[RequiresGlobalFeature(typeof(PagesFeature))] [RequiresGlobalFeature(typeof(PagesFeature))]
[RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitPublicRemoteServiceConsts.ModuleName)] [Area(CmsKitPublicRemoteServiceConsts.ModuleName)]

3
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Ratings/RatingPublicController.cs

@ -2,11 +2,14 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
namespace Volo.CmsKit.Public.Ratings; namespace Volo.CmsKit.Public.Ratings;
[RequiresFeature(CmsKitFeatures.RatingEnable)]
[RequiresGlobalFeature(typeof(RatingsFeature))] [RequiresGlobalFeature(typeof(RatingsFeature))]
[RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitPublicRemoteServiceConsts.ModuleName)] [Area(CmsKitPublicRemoteServiceConsts.ModuleName)]

3
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Reactions/ReactionPublicController.cs

@ -2,11 +2,14 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
namespace Volo.CmsKit.Public.Reactions; namespace Volo.CmsKit.Public.Reactions;
[RequiresFeature(CmsKitFeatures.ReactionEnable)]
[RequiresGlobalFeature(typeof(ReactionsFeature))] [RequiresGlobalFeature(typeof(ReactionsFeature))]
[RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitPublicRemoteServiceConsts.ModuleName)] [Area(CmsKitPublicRemoteServiceConsts.ModuleName)]

7
modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Tags/TagPublicController.cs

@ -1,13 +1,16 @@
using Microsoft.AspNetCore.Mvc; using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Features;
using Volo.Abp.GlobalFeatures; using Volo.Abp.GlobalFeatures;
using Volo.CmsKit.Features;
using Volo.CmsKit.GlobalFeatures; using Volo.CmsKit.GlobalFeatures;
using Volo.CmsKit.Tags; using Volo.CmsKit.Tags;
namespace Volo.CmsKit.Public.Tags; namespace Volo.CmsKit.Public.Tags;
[RequiresFeature(CmsKitFeatures.TagEnable)]
[RequiresGlobalFeature(typeof(TagsFeature))] [RequiresGlobalFeature(typeof(TagsFeature))]
[RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)]
[Area(CmsKitPublicRemoteServiceConsts.ModuleName)] [Area(CmsKitPublicRemoteServiceConsts.ModuleName)]

6
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerBuilderOptions.cs

@ -27,4 +27,10 @@ public class AbpIdentityServerBuilderOptions
/// Set false to suppress AddDeveloperSigningCredential() call on the IIdentityServerBuilder. /// Set false to suppress AddDeveloperSigningCredential() call on the IIdentityServerBuilder.
/// </summary> /// </summary>
public bool AddDeveloperSigningCredential { get; set; } = true; public bool AddDeveloperSigningCredential { get; set; } = true;
/// <summary>
/// Adds the default cookie handlers and corresponding configuration
/// Default: true, Set false to suppress AddCookieAuthentication() call on the IIdentityServerBuilder.
/// </summary>
public bool AddIdentityServerCookieAuthentication { get; set; } = true;
} }

40
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs

@ -1,4 +1,5 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using IdentityServer4.Configuration;
using IdentityServer4.Services; using IdentityServer4.Services;
using IdentityServer4.Stores; using IdentityServer4.Stores;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
@ -71,13 +72,7 @@ public class AbpIdentityServerDomainModule : AbpModule
var configuration = services.GetConfiguration(); var configuration = services.GetConfiguration();
var builderOptions = services.ExecutePreConfiguredActions<AbpIdentityServerBuilderOptions>(); var builderOptions = services.ExecutePreConfiguredActions<AbpIdentityServerBuilderOptions>();
var identityServerBuilder = services.AddIdentityServer(options => var identityServerBuilder = AddIdentityServer(services, builderOptions);
{
options.Events.RaiseErrorEvents = true;
options.Events.RaiseInformationEvents = true;
options.Events.RaiseFailureEvents = true;
options.Events.RaiseSuccessEvents = true;
});
if (builderOptions.AddDeveloperSigningCredential) if (builderOptions.AddDeveloperSigningCredential)
{ {
@ -110,6 +105,37 @@ public class AbpIdentityServerDomainModule : AbpModule
} }
} }
private static IIdentityServerBuilder AddIdentityServer(IServiceCollection services, AbpIdentityServerBuilderOptions abpIdentityServerBuilderOptions)
{
services.Configure<IdentityServerOptions>(options =>
{
options.Events.RaiseErrorEvents = true;
options.Events.RaiseInformationEvents = true;
options.Events.RaiseFailureEvents = true;
options.Events.RaiseSuccessEvents = true;
});
var identityServerBuilder = services.AddIdentityServerBuilder()
.AddRequiredPlatformServices()
.AddCoreServices()
.AddDefaultEndpoints()
.AddPluggableServices()
.AddValidators()
.AddResponseGenerators()
.AddDefaultSecretParsers()
.AddDefaultSecretValidators();
if (abpIdentityServerBuilderOptions.AddIdentityServerCookieAuthentication)
{
identityServerBuilder.AddCookieAuthentication();
}
// provide default in-memory implementation, not suitable for most production scenarios
identityServerBuilder.AddInMemoryPersistedGrants();
return identityServerBuilder;
}
public override void PostConfigureServices(ServiceConfigurationContext context) public override void PostConfigureServices(ServiceConfigurationContext context)
{ {
OneTimeRunner.Run(() => OneTimeRunner.Run(() =>

6
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/AbpTenantManagementDomainSharedModule.cs

@ -1,6 +1,7 @@
using Volo.Abp.Localization; using Volo.Abp.Localization;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.TenantManagement.Localization; using Volo.Abp.TenantManagement.Localization;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Validation; using Volo.Abp.Validation;
using Volo.Abp.Validation.Localization; using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem; using Volo.Abp.VirtualFileSystem;
@ -25,5 +26,10 @@ public class AbpTenantManagementDomainSharedModule : AbpModule
typeof(AbpValidationResource) typeof(AbpValidationResource)
).AddVirtualJson("/Volo/Abp/TenantManagement/Localization/Resources"); ).AddVirtualJson("/Volo/Abp/TenantManagement/Localization/Resources");
}); });
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("Volo.Abp.TenantManagement", typeof(AbpTenantManagementResource));
});
} }
} }

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/ar.json

@ -1,6 +1,7 @@
{ {
"culture": "ar", "culture": "ar",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "اسم المستأجر موجود بالفعل: {Name}",
"Menu:TenantManagement": "إدارة الجهات", "Menu:TenantManagement": "إدارة الجهات",
"Tenants": "الجهات", "Tenants": "الجهات",
"NewTenant": "جهة جديدة", "NewTenant": "جهة جديدة",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/de-DE.json

@ -1,6 +1,7 @@
{ {
"culture": "de-DE", "culture": "de-DE",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "Der Name des Mandanten ist bereits vorhanden: {Name}",
"Menu:TenantManagement": "Mandantenverwaltung", "Menu:TenantManagement": "Mandantenverwaltung",
"Tenants": "Mandanten", "Tenants": "Mandanten",
"NewTenant": "Neuer Mandant", "NewTenant": "Neuer Mandant",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/en.json

@ -1,6 +1,7 @@
{ {
"culture": "en", "culture": "en",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "Tenant name already exist: {Name}",
"Menu:TenantManagement": "Tenant management", "Menu:TenantManagement": "Tenant management",
"Tenants": "Tenants", "Tenants": "Tenants",
"NewTenant": "New tenant", "NewTenant": "New tenant",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/es.json

@ -1,6 +1,7 @@
{ {
"culture": "es", "culture": "es",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "El nombre del inquilino ya existe: {Name}",
"Menu:TenantManagement": "Gestión de tenants", "Menu:TenantManagement": "Gestión de tenants",
"Tenants": "Inquilinos", "Tenants": "Inquilinos",
"NewTenant": "Nuevo inquilino", "NewTenant": "Nuevo inquilino",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/fi.json

@ -1,6 +1,7 @@
{ {
"culture": "fi", "culture": "fi",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "Vuokralaisen nimi on jo olemassa: {Name}",
"Menu:TenantManagement": "Vuokralaisten hallinta", "Menu:TenantManagement": "Vuokralaisten hallinta",
"Tenants": "Vuokralaiset", "Tenants": "Vuokralaiset",
"NewTenant": "Uusi vuokralainen", "NewTenant": "Uusi vuokralainen",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/fr.json

@ -1,6 +1,7 @@
{ {
"culture": "fr", "culture": "fr",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "Le nom du locataire existe déjà: {Name}",
"Menu:TenantManagement": "Gestion des locataires", "Menu:TenantManagement": "Gestion des locataires",
"Tenants": "Locataires", "Tenants": "Locataires",
"NewTenant": "Nouveau locataire", "NewTenant": "Nouveau locataire",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/hi.json

@ -1,6 +1,7 @@
{ {
"culture": "hi", "culture": "hi",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "किरायेदार नाम पहले से मौजूद है: {Name}",
"Menu:TenantManagement": "किरायेदार प्रबंधन", "Menu:TenantManagement": "किरायेदार प्रबंधन",
"Tenants": "किरायेदारों", "Tenants": "किरायेदारों",
"NewTenant": "नया किरायेदार", "NewTenant": "नया किरायेदार",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/it.json

@ -1,6 +1,7 @@
{ {
"culture": "it", "culture": "it",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "Il nome del tenant esiste già: {Name}",
"Menu:TenantManagement": "Gestione tenants", "Menu:TenantManagement": "Gestione tenants",
"Tenants": "Tenants", "Tenants": "Tenants",
"NewTenant": "Nuovo Tenant", "NewTenant": "Nuovo Tenant",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/pt-BR.json

@ -1,6 +1,7 @@
{ {
"culture": "pt-BR", "culture": "pt-BR",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "O nome do ambiente já existe: {Name}",
"Menu:TenantManagement": "Gerencimento de Inquilinos", "Menu:TenantManagement": "Gerencimento de Inquilinos",
"Tenants": "Inquilinos", "Tenants": "Inquilinos",
"NewTenant": "Novo Inquilino", "NewTenant": "Novo Inquilino",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/ru.json

@ -1,6 +1,7 @@
{ {
"culture": "ru", "culture": "ru",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "Имя арендатора уже существует: {Name}",
"Menu:TenantManagement": "Управление арендаторами", "Menu:TenantManagement": "Управление арендаторами",
"Tenants": "Арендаторы", "Tenants": "Арендаторы",
"NewTenant": "Новый арендатор", "NewTenant": "Новый арендатор",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/sk.json

@ -1,6 +1,7 @@
{ {
"culture": "sk", "culture": "sk",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "Názov tenanta už existuje: {Name}",
"Menu:TenantManagement": "Správa tenantov", "Menu:TenantManagement": "Správa tenantov",
"Tenants": "Tentanti", "Tenants": "Tentanti",
"NewTenant": "Nový tenant", "NewTenant": "Nový tenant",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/sl.json

@ -1,6 +1,7 @@
{ {
"culture": "sl", "culture": "sl",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "Ime najemnika že obstaja: {Name}",
"Menu:TenantManagement": "Upravljanje najemnikov", "Menu:TenantManagement": "Upravljanje najemnikov",
"Tenants": "Najemniki", "Tenants": "Najemniki",
"NewTenant": "Nov najemnik", "NewTenant": "Nov najemnik",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/tr.json

@ -1,6 +1,7 @@
{ {
"culture": "tr", "culture": "tr",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "Müşteri ismi zaten mevcut: {Name}",
"Menu:TenantManagement": "Müşteri yönetimi", "Menu:TenantManagement": "Müşteri yönetimi",
"Tenants": "Müşteriler", "Tenants": "Müşteriler",
"NewTenant": "Yeni müşteri", "NewTenant": "Yeni müşteri",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hans.json

@ -1,6 +1,7 @@
{ {
"culture": "zh-Hans", "culture": "zh-Hans",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "租户名称已存在: {Name}",
"Menu:TenantManagement": "租户管理", "Menu:TenantManagement": "租户管理",
"Tenants": "租户", "Tenants": "租户",
"NewTenant": "新租户", "NewTenant": "新租户",

1
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hant.json

@ -1,6 +1,7 @@
{ {
"culture": "zh-Hant", "culture": "zh-Hant",
"texts": { "texts": {
"Volo.Abp.TenantManagement:DuplicateTenantName": "租戶名稱已存在: {Name}",
"Menu:TenantManagement": "租戶管理", "Menu:TenantManagement": "租戶管理",
"Tenants": "租戶", "Tenants": "租戶",
"NewTenant": "新租戶", "NewTenant": "新租戶",

2
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantManager.cs

@ -36,7 +36,7 @@ public class TenantManager : DomainService, ITenantManager
var tenant = await TenantRepository.FindByNameAsync(name); var tenant = await TenantRepository.FindByNameAsync(name);
if (tenant != null && tenant.Id != expectedId) if (tenant != null && tenant.Id != expectedId)
{ {
throw new UserFriendlyException("Duplicate tenancy name: " + name); //TODO: A domain exception would be better..? throw new BusinessException("Volo.Abp.TenantManagement:DuplicateTenantName").WithData("Name", name);
} }
} }
} }

4
modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo/Abp/TenantManagement/TenantAppService_Tests.cs

@ -66,7 +66,7 @@ public class TenantAppService_Tests : AbpTenantManagementApplicationTestBase
[Fact] [Fact]
public async Task CreateAsync_Should_Not_Allow_Duplicate_Names() public async Task CreateAsync_Should_Not_Allow_Duplicate_Names()
{ {
await Assert.ThrowsAsync<UserFriendlyException>(async () => await Assert.ThrowsAsync<BusinessException>(async () =>
{ {
await _tenantAppService.CreateAsync(new TenantCreateDto { Name = "acme", AdminEmailAddress = "admin@admin.com", AdminPassword = "123456" }); await _tenantAppService.CreateAsync(new TenantCreateDto { Name = "acme", AdminEmailAddress = "admin@admin.com", AdminPassword = "123456" });
}); });
@ -90,7 +90,7 @@ public class TenantAppService_Tests : AbpTenantManagementApplicationTestBase
{ {
var acme = UsingDbContext(dbContext => dbContext.Tenants.Single(t => t.Name == "acme")); var acme = UsingDbContext(dbContext => dbContext.Tenants.Single(t => t.Name == "acme"));
await Assert.ThrowsAsync<UserFriendlyException>(async () => await Assert.ThrowsAsync<BusinessException>(async () =>
{ {
await _tenantAppService.UpdateAsync(acme.Id, new TenantUpdateDto { Name = "volosoft" }); await _tenantAppService.UpdateAsync(acme.Id, new TenantUpdateDto { Name = "volosoft" });
}); });

4
modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantManager_Tests.cs

@ -26,7 +26,7 @@ public class TenantManager_Tests : AbpTenantManagementDomainTestBase
[Fact] [Fact]
public async Task Create_Tenant_Name_Can_Not_Duplicate() public async Task Create_Tenant_Name_Can_Not_Duplicate()
{ {
await Assert.ThrowsAsync<UserFriendlyException>(async () => await _tenantManager.CreateAsync("volosoft")); await Assert.ThrowsAsync<BusinessException>(async () => await _tenantManager.CreateAsync("volosoft"));
} }
[Fact] [Fact]
@ -46,6 +46,6 @@ public class TenantManager_Tests : AbpTenantManagementDomainTestBase
var tenant = await _tenantRepository.FindByNameAsync("acme"); var tenant = await _tenantRepository.FindByNameAsync("acme");
tenant.ShouldNotBeNull(); tenant.ShouldNotBeNull();
await Assert.ThrowsAsync<UserFriendlyException>(async () => await _tenantManager.ChangeNameAsync(tenant, "volosoft")); await Assert.ThrowsAsync<BusinessException>(async () => await _tenantManager.ChangeNameAsync(tenant, "volosoft"));
} }
} }

2
npm/ng-packs/.gitignore

@ -54,3 +54,5 @@ Thumbs.db
!**/[Pp]ackages/* !**/[Pp]ackages/*
*.internal.* *.internal.*
.angular

4
npm/ng-packs/package.json

@ -34,7 +34,9 @@
"dev:schematics": "tsc -p packages/schematics/tsconfig.json -w", "dev:schematics": "tsc -p packages/schematics/tsconfig.json -w",
"ci": "yarn affected:lint && yarn affected:build && yarn affected:test", "ci": "yarn affected:lint && yarn affected:build && yarn affected:test",
"lerna": "lerna", "lerna": "lerna",
"migrate-nx": "yarn nx migrate --run-migrations" "migrate-nx": "yarn nx migrate --run-migrations",
"mock:schematics": "cd scripts/mock-schematic && yarn && yarn start",
"debug:schematics": "./node_modules/.bin/ng g ./packages/schematics/src/collection.json:proxy-add --module __default --apiName __default --source __default --target __default --url http://localhost:4300"
}, },
"private": true, "private": true,
"devDependencies": { "devDependencies": {

4
npm/ng-packs/packages/identity/src/lib/defaults/default-users-form-props.ts

@ -63,6 +63,4 @@ export const DEFAULT_USERS_CREATE_FORM_PROPS = FormProp.createMany<IdentityUserD
}, },
]); ]);
export const DEFAULT_USERS_EDIT_FORM_PROPS = DEFAULT_USERS_CREATE_FORM_PROPS.filter( export const DEFAULT_USERS_EDIT_FORM_PROPS = DEFAULT_USERS_CREATE_FORM_PROPS
prop => prop.name !== 'password',
);

1
npm/ng-packs/packages/schematics/src/models/index.ts

@ -5,6 +5,7 @@ export * from './method';
export * from './model'; export * from './model';
export * from './project'; export * from './project';
export * from './proxy-config'; export * from './proxy-config';
export * from './rule';
export * from './service'; export * from './service';
export * from './tree'; export * from './tree';
export * from './util'; export * from './util';

3
npm/ng-packs/packages/schematics/src/models/rule.ts

@ -0,0 +1,3 @@
import { Rule } from '@angular-devkit/schematics';
export type RuleReturn = ReturnType<Rule>;

8
npm/ng-packs/packages/schematics/src/utils/rule.ts

@ -9,11 +9,15 @@ import {
Source, Source,
Tree, Tree,
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import { RuleReturn } from '../models/rule';
export function applyWithOverwrite(source: Source, rules: Rule[]): Rule { export function applyWithOverwrite(source: Source, rules: Rule[]): Rule {
return (tree: Tree, _context: SchematicContext) => { return (tree: Tree, _context: SchematicContext) => {
const rule = mergeWith(apply(source, [...rules, overwriteFileIfExists(tree)])); const mapped = rules.map<Rule>(r => {
return ((_tree: Tree, _ctx: SchematicContext) =>
new Promise<RuleReturn>(res => res(r(_tree, _ctx)))) as Rule;
});
const rule = mergeWith(apply(source, [...mapped, overwriteFileIfExists(tree)]));
return rule(tree, _context); return rule(tree, _context);
}; };
} }

0
npm/ng-packs/packages/schematics/src/mocks/api-definition.json → npm/ng-packs/scripts/mock-schematic/api-definition.json

13
npm/ng-packs/scripts/mock-schematic/mock-schematic-json.ts

@ -0,0 +1,13 @@
import express, { Request, Response } from 'express';
import fs from 'fs';
const port = 4300;
const app = express();
app.get('/api/abp/api-definition', async (req: Request, res: Response) => {
const file = fs.readFileSync('./api-definition.json');
res.contentType('application/json');
res.send(file);
});
app.listen(port, () => console.log(`Server listening on http://localhost:${port}`));

22
npm/ng-packs/scripts/mock-schematic/package.json

@ -0,0 +1,22 @@
{
"name": "mocks-schematics",
"version": "0.0.1",
"description": "ABP Mock Proxy Generation App",
"scripts": {
"start": "nodemon mock-schematic-json.ts"
},
"author": "",
"dependencies": {
"babel-preset-node6": "^11.0.0",
"express": "^4.18.1"
},
"devDependencies": {
"@types/node": "^13.1.2",
"esm": "^3.2.25",
"ts-node": "^8.5.4",
"tsconfig-paths": "^3.9.0",
"typescript": "^3.7.4",
"nodemon": "^2.0.19",
"@types/express": "^4.17.13"
}
}

12
npm/ng-packs/scripts/mock-schematic/tsconfig.json

@ -0,0 +1,12 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}

3
templates/console/src/MyCompanyName.MyProjectName/Program.cs

@ -36,10 +36,9 @@ public class Program
services.AddApplicationAsync<MyProjectNameModule>(options => services.AddApplicationAsync<MyProjectNameModule>(options =>
{ {
options.Services.ReplaceConfiguration(services.GetConfiguration()); options.Services.ReplaceConfiguration(services.GetConfiguration());
options.UseAutofac();
options.Services.AddLogging(loggingBuilder => loggingBuilder.AddSerilog()); options.Services.AddLogging(loggingBuilder => loggingBuilder.AddSerilog());
}); });
}).UseConsoleLifetime(); }).UseAutofac().UseConsoleLifetime();
var host = builder.Build(); var host = builder.Build();
await host.Services.GetRequiredService<IAbpApplicationWithExternalServiceProvider>().InitializeAsync(host.Services); await host.Services.GetRequiredService<IAbpApplicationWithExternalServiceProvider>().InitializeAsync(host.Services);

Loading…
Cancel
Save