这是基于vue-vben-admin 模板适用于abp Vnext的前端管理项目
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

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 group
  • WxPusher.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 settings
  • GET /api/setting-management/wxpusher/by-current-tenant: Get current tenant settings

Important Notes

  1. Proper permission configuration is required to manage settings.
  2. Sensitive information like AppToken needs to be properly secured.
  3. Pay attention to the scope of settings in multi-tenant environments.

Source Code

LINGYUN.Abp.WxPusher.SettingManagement