first commit
This commit is contained in:
		| @ -0,0 +1,25 @@ | ||||
| <Project Sdk="Microsoft.NET.Sdk"> | ||||
|  | ||||
|   <Import Project="..\..\common.props" /> | ||||
|  | ||||
|   <PropertyGroup> | ||||
|     <TargetFramework>net8.0</TargetFramework> | ||||
|     <Nullable>enable</Nullable> | ||||
|     <RootNamespace>KonSoft.TenantManagement</RootNamespace> | ||||
|   </PropertyGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <ProjectReference Include="..\KonSoft.TenantManagement.Domain.Shared\KonSoft.TenantManagement.Domain.Shared.csproj" /> | ||||
|   </ItemGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <PackageReference Include="Volo.Abp.ObjectExtending" Version="8.3.4" /> | ||||
|     <PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="8.3.4" /> | ||||
|     <PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="8.3.4" /> | ||||
|     <PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="8.3.4" /> | ||||
|     <PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="8.3.4" /> | ||||
|     <PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="8.3.4" /> | ||||
|     <PackageReference Include="Volo.Abp.SettingManagement.Application.Contracts" Version="8.3.4" /> | ||||
|   </ItemGroup> | ||||
|  | ||||
| </Project> | ||||
| @ -0,0 +1,20 @@ | ||||
| using KonSoft.TenantManagement.Localization; | ||||
| using Volo.Abp.Authorization.Permissions; | ||||
| using Volo.Abp.Localization; | ||||
|  | ||||
| namespace KonSoft.TenantManagement.Permissions; | ||||
|  | ||||
| public class TenantManagementPermissionDefinitionProvider : PermissionDefinitionProvider | ||||
| { | ||||
|     public override void Define(IPermissionDefinitionContext context) | ||||
|     { | ||||
|         var myGroup = context.AddGroup(TenantManagementPermissions.GroupName); | ||||
|         //Define your own permissions here. Example: | ||||
|         //myGroup.AddPermission(TenantManagementPermissions.MyPermission1, L("Permission:MyPermission1")); | ||||
|     } | ||||
|  | ||||
|     private static LocalizableString L(string name) | ||||
|     { | ||||
|         return LocalizableString.Create<TenantManagementResource>(name); | ||||
|     } | ||||
| } | ||||
| @ -0,0 +1,9 @@ | ||||
| namespace KonSoft.TenantManagement.Permissions; | ||||
|  | ||||
| public static class TenantManagementPermissions | ||||
| { | ||||
|     public const string GroupName = "TenantManagement"; | ||||
|  | ||||
|     //Add your own permission names. Example: | ||||
|     //public const string MyPermission1 = GroupName + ".MyPermission1"; | ||||
| } | ||||
| @ -0,0 +1,28 @@ | ||||
| using Volo.Abp.Account; | ||||
| using Volo.Abp.FeatureManagement; | ||||
| using Volo.Abp.Identity; | ||||
| using Volo.Abp.Modularity; | ||||
| using Volo.Abp.ObjectExtending; | ||||
| using Volo.Abp.PermissionManagement; | ||||
| using Volo.Abp.SettingManagement; | ||||
| using Volo.Abp.TenantManagement; | ||||
|  | ||||
| namespace KonSoft.TenantManagement; | ||||
|  | ||||
| [DependsOn( | ||||
|     typeof(TenantManagementDomainSharedModule), | ||||
|     typeof(AbpAccountApplicationContractsModule), | ||||
|     typeof(AbpFeatureManagementApplicationContractsModule), | ||||
|     typeof(AbpIdentityApplicationContractsModule), | ||||
|     typeof(AbpPermissionManagementApplicationContractsModule), | ||||
|     typeof(AbpSettingManagementApplicationContractsModule), | ||||
|     typeof(AbpTenantManagementApplicationContractsModule), | ||||
|     typeof(AbpObjectExtendingModule) | ||||
| )] | ||||
| public class TenantManagementApplicationContractsModule : AbpModule | ||||
| { | ||||
|     public override void PreConfigureServices(ServiceConfigurationContext context) | ||||
|     { | ||||
|         TenantManagementDtoExtensions.Configure(); | ||||
|     } | ||||
| } | ||||
| @ -0,0 +1,28 @@ | ||||
| using Volo.Abp.Identity; | ||||
| using Volo.Abp.ObjectExtending; | ||||
| using Volo.Abp.Threading; | ||||
|  | ||||
| namespace KonSoft.TenantManagement; | ||||
|  | ||||
| public static class TenantManagementDtoExtensions | ||||
| { | ||||
|     private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); | ||||
|  | ||||
|     public static void Configure() | ||||
|     { | ||||
|         OneTimeRunner.Run(() => | ||||
|         { | ||||
|                 /* You can add extension properties to DTOs | ||||
|                  * defined in the depended modules. | ||||
|                  * | ||||
|                  * Example: | ||||
|                  * | ||||
|                  * ObjectExtensionManager.Instance | ||||
|                  *   .AddOrUpdateProperty<IdentityRoleDto, string>("Title"); | ||||
|                  * | ||||
|                  * See the documentation for more: | ||||
|                  * https://docs.abp.io/en/abp/latest/Object-Extensions | ||||
|                  */ | ||||
|         }); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user