You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.6 KiB
2.6 KiB
LINGYUN.Abp.WxPusher.SettingManagement
WxPusher setting management module, providing management functionality for WxPusher-related settings.
Features
- WxPusher settings management
- AppToken management
- Security settings management
- Permission control
- Based on ABP permission system
- Fine-grained settings management permissions
- Multi-tenant support
- Global settings support
- Tenant-level settings support
- Localization support
- Multi-language interface
- Localized setting descriptions
Installation
dotnet add package LINGYUN.Abp.WxPusher.SettingManagement
Module Reference
[DependsOn(typeof(AbpWxPusherSettingManagementModule))]
public class YouProjectModule : AbpModule
{
// other
}
Permission Configuration
1. Permission Definitions
WxPusher: WxPusher permission groupWxPusher.ManageSetting: Permission to manage WxPusher settings
2. Authorization Configuration
public class YourAuthorizationProvider : AuthorizationProvider
{
public override void Define(IAuthorizationDefinitionContext context)
{
var wxPusher = context.GetPermissionOrNull(WxPusherSettingPermissionNames.GroupName)
?? context.AddGroup(WxPusherSettingPermissionNames.GroupName);
wxPusher.AddPermission(WxPusherSettingPermissionNames.ManageSetting);
}
}
Usage
1. Getting Settings
public class YourService
{
private readonly IWxPusherSettingAppService _wxPusherSettingAppService;
public YourService(IWxPusherSettingAppService wxPusherSettingAppService)
{
_wxPusherSettingAppService = wxPusherSettingAppService;
}
public async Task GetSettingsAsync()
{
// Get global settings
var globalSettings = await _wxPusherSettingAppService.GetAllForGlobalAsync();
// Get current tenant settings
var tenantSettings = await _wxPusherSettingAppService.GetAllForCurrentTenantAsync();
}
}
2. API Endpoints
GET /api/setting-management/wxpusher/by-global: Get global settingsGET /api/setting-management/wxpusher/by-current-tenant: Get current tenant settings
Important Notes
- Proper permission configuration is required to manage settings.
- Sensitive information like AppToken needs to be properly secured.
- Pay attention to the scope of settings in multi-tenant environments.