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.Report</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\KonSoft.Report.Domain.Shared\KonSoft.Report.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.Report.Localization;
|
||||
using Volo.Abp.Authorization.Permissions;
|
||||
using Volo.Abp.Localization;
|
||||
|
||||
namespace KonSoft.Report.Permissions;
|
||||
|
||||
public class ReportPermissionDefinitionProvider : PermissionDefinitionProvider
|
||||
{
|
||||
public override void Define(IPermissionDefinitionContext context)
|
||||
{
|
||||
var myGroup = context.AddGroup(ReportPermissions.GroupName);
|
||||
//Define your own permissions here. Example:
|
||||
//myGroup.AddPermission(ReportPermissions.MyPermission1, L("Permission:MyPermission1"));
|
||||
}
|
||||
|
||||
private static LocalizableString L(string name)
|
||||
{
|
||||
return LocalizableString.Create<ReportResource>(name);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
namespace KonSoft.Report.Permissions;
|
||||
|
||||
public static class ReportPermissions
|
||||
{
|
||||
public const string GroupName = "Report";
|
||||
|
||||
//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.Report;
|
||||
|
||||
[DependsOn(
|
||||
typeof(ReportDomainSharedModule),
|
||||
typeof(AbpAccountApplicationContractsModule),
|
||||
typeof(AbpFeatureManagementApplicationContractsModule),
|
||||
typeof(AbpIdentityApplicationContractsModule),
|
||||
typeof(AbpPermissionManagementApplicationContractsModule),
|
||||
typeof(AbpSettingManagementApplicationContractsModule),
|
||||
typeof(AbpTenantManagementApplicationContractsModule),
|
||||
typeof(AbpObjectExtendingModule)
|
||||
)]
|
||||
public class ReportApplicationContractsModule : AbpModule
|
||||
{
|
||||
public override void PreConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
ReportDtoExtensions.Configure();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
using Volo.Abp.Identity;
|
||||
using Volo.Abp.ObjectExtending;
|
||||
using Volo.Abp.Threading;
|
||||
|
||||
namespace KonSoft.Report;
|
||||
|
||||
public static class ReportDtoExtensions
|
||||
{
|
||||
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