-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4236 from abpframework/blog-module-admin-separation
Blog module admin separation
- Loading branch information
Showing
86 changed files
with
1,118 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> | ||
<ConfigureAwait ContinueOnCapturedContext="false" /> | ||
</Weavers> |
30 changes: 30 additions & 0 deletions
30
modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/FodyWeavers.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> | ||
<xs:element name="Weavers"> | ||
<xs:complexType> | ||
<xs:all> | ||
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> | ||
<xs:complexType> | ||
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:all> | ||
<xs:attribute name="VerifyAssembly" type="xs:boolean"> | ||
<xs:annotation> | ||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> | ||
<xs:annotation> | ||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="GenerateXsd" type="xs:boolean"> | ||
<xs:annotation> | ||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
31 changes: 31 additions & 0 deletions
31
...olo.Blogging.Admin.Application.Contracts/Volo.Blogging.Admin.Application.Contracts.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<Import Project="..\..\..\..\configureawait.props" /> | ||
<Import Project="..\..\..\..\common.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<AssemblyName>Volo.Blogging.Admin.Application.Contracts</AssemblyName> | ||
<PackageId>Volo.Blogging.Admin.Application.Contracts</PackageId> | ||
<RootNamespace /> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Volo.Blogging.Domain.Shared\Volo.Blogging.Domain.Shared.csproj" /> | ||
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Ddd.Application\Volo.Abp.Ddd.Application.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<EmbeddedResource Include="Volo\Blogging\Admin\Localization\Resources\Blogging\Admin\ApplicationContracts\cs.json" /> | ||
<EmbeddedResource Include="Volo\Blogging\Admin\Localization\Resources\Blogging\Admin\ApplicationContracts\de.json" /> | ||
<EmbeddedResource Include="Volo\Blogging\Admin\Localization\Resources\Blogging\Admin\ApplicationContracts\en.json" /> | ||
<EmbeddedResource Include="Volo\Blogging\Admin\Localization\Resources\Blogging\Admin\ApplicationContracts\nl.json" /> | ||
<EmbeddedResource Include="Volo\Blogging\Admin\Localization\Resources\Blogging\Admin\ApplicationContracts\pl-PL.json" /> | ||
<EmbeddedResource Include="Volo\Blogging\Admin\Localization\Resources\Blogging\Admin\ApplicationContracts\pt-BR.json" /> | ||
<EmbeddedResource Include="Volo\Blogging\Admin\Localization\Resources\Blogging\Admin\ApplicationContracts\sl.json" /> | ||
<EmbeddedResource Include="Volo\Blogging\Admin\Localization\Resources\Blogging\Admin\ApplicationContracts\tr.json" /> | ||
<EmbeddedResource Include="Volo\Blogging\Admin\Localization\Resources\Blogging\Admin\ApplicationContracts\vi.json" /> | ||
<EmbeddedResource Include="Volo\Blogging\Admin\Localization\Resources\Blogging\Admin\ApplicationContracts\zh-Hans.json" /> | ||
<EmbeddedResource Include="Volo\Blogging\Admin\Localization\Resources\Blogging\Admin\ApplicationContracts\zh-Hant.json" /> | ||
</ItemGroup> | ||
</Project> |
25 changes: 25 additions & 0 deletions
25
...dmin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminApplicationContractsModule.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Volo.Abp.Localization; | ||
using Volo.Abp.Modularity; | ||
using Volo.Abp.VirtualFileSystem; | ||
using Volo.Blogging.Localization; | ||
|
||
namespace Volo.Blogging.Admin | ||
{ | ||
[DependsOn(typeof(BloggingDomainSharedModule))] | ||
public class BloggingAdminApplicationContractsModule : AbpModule | ||
{ | ||
public override void ConfigureServices(ServiceConfigurationContext context) | ||
{ | ||
Configure<AbpVirtualFileSystemOptions>(options => | ||
{ | ||
options.FileSets.AddEmbedded<BloggingAdminApplicationContractsModule>(); | ||
}); | ||
Configure<AbpLocalizationOptions>(options => | ||
{ | ||
options.Resources | ||
.Get<BloggingResource>() | ||
.AddVirtualJson("Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts"); | ||
}); | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...in.Application.Contracts/Volo/Blogging/Admin/BloggingAdminPermissionDefinitionProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Volo.Abp.Authorization.Permissions; | ||
using Volo.Abp.Localization; | ||
using Volo.Blogging.Localization; | ||
|
||
namespace Volo.Blogging.Admin | ||
{ | ||
public class BloggingAdminPermissionDefinitionProvider : PermissionDefinitionProvider | ||
{ | ||
public override void Define(IPermissionDefinitionContext context) | ||
{ | ||
var bloggingGroup = context.AddGroup(BloggingAdminPermissions.GroupName, L("Permission:BloggingAdmin")); | ||
|
||
var blogs = bloggingGroup.AddPermission(BloggingAdminPermissions.Blogs.Default, L("Permission:Blogs")); | ||
blogs.AddChild(BloggingAdminPermissions.Blogs.Management, L("Permission:Management")); | ||
blogs.AddChild(BloggingAdminPermissions.Blogs.Update, L("Permission:Edit")); | ||
blogs.AddChild(BloggingAdminPermissions.Blogs.Delete, L("Permission:Delete")); | ||
blogs.AddChild(BloggingAdminPermissions.Blogs.Create, L("Permission:Create")); | ||
} | ||
|
||
private static LocalizableString L(string name) | ||
{ | ||
return LocalizableString.Create<BloggingResource>(name); | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminPermissions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using Volo.Abp.Reflection; | ||
|
||
namespace Volo.Blogging.Admin | ||
{ | ||
public class BloggingAdminPermissions | ||
{ | ||
public const string GroupName = "Blogging.Admin"; | ||
|
||
public static class Blogs | ||
{ | ||
public const string Default = GroupName + ".Blog"; | ||
public const string Management = Default + ".Management"; | ||
public const string Delete = Default + ".Delete"; | ||
public const string Update = Default + ".Update"; | ||
public const string Create = Default + ".Create"; | ||
} | ||
|
||
public static string[] GetAll() | ||
{ | ||
return ReflectionHelper.GetPublicConstantsRecursively(typeof(BloggingAdminPermissions)); | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...gging.Admin.Application.Contracts/Volo/Blogging/Admin/BloggingAdminRemoteServiceConsts.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Volo.Blogging.Admin | ||
{ | ||
public static class BloggingAdminRemoteServiceConsts | ||
{ | ||
public const string RemoteServiceName = "BloggingAdmin"; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...ogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/BlogDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using Volo.Abp.Application.Dtos; | ||
|
||
namespace Volo.Blogging.Admin.Blogs | ||
{ | ||
public class BlogDto : FullAuditedEntityDto<Guid> | ||
{ | ||
public string Name { get; set; } | ||
|
||
public string ShortName { get; set; } | ||
|
||
public string Description { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...ogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/IBlogManagementAppService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Volo.Abp.Application.Dtos; | ||
using Volo.Abp.Application.Services; | ||
|
||
namespace Volo.Blogging.Admin.Blogs | ||
{ | ||
public interface IBlogManagementAppService : IApplicationService | ||
{ | ||
Task<ListResultDto<BlogDto>> GetListAsync(); | ||
|
||
Task<BlogDto> GetAsync(Guid id); | ||
|
||
Task<BlogDto> CreateAsync(CreateBlogDto input); | ||
|
||
Task<BlogDto> UpdateAsync(Guid id, UpdateBlogDto input); | ||
|
||
Task DeleteAsync(Guid id); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...ts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/cs.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"culture": "cs", | ||
"texts": { | ||
"Permission:BloggingAdmin": "Blog", | ||
"Permission:Blogs": "Blogy", | ||
"Permission:Management": "Správa", | ||
"Permission:Edit": "Upravit", | ||
"Permission:Create": "Vytvořit", | ||
"Permission:Delete": "Smazat" | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/de.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"culture": "de", | ||
"texts": { | ||
"Permission:BloggingAdmin": "Blog", | ||
"Permission:Blogs": "Blogs", | ||
"Permission:Management": "Verwaltung", | ||
"Permission:Edit": "Bearbeiten", | ||
"Permission:Create": "Erstellen", | ||
"Permission:Delete": "Löschen" | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/en.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"culture": "en", | ||
"texts": { | ||
"Permission:BloggingAdmin": "Blogging", | ||
"Permission:Blogs": "Blogs", | ||
"Permission:Management": "Management", | ||
"Permission:Edit": "Edit", | ||
"Permission:Create": "Create", | ||
"Permission:Delete": "Delete" | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ts/Volo/Blogging/Admin/Localization/Resources/Blogging/Admin/ApplicationContracts/nl.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"culture": "nl", | ||
"texts": { | ||
"Permission:BloggingAdmin": "Blog", | ||
"Permission:Blogs": "Blogs", | ||
"Permission:Management": "Beheer", | ||
"Permission:Edit": "Bewerk", | ||
"Permission:Create": "Maak aan", | ||
"Permission:Delete": "Verwijder" | ||
} | ||
} |
Oops, something went wrong.