Browse Source

fix: 修复获取权限bug

fix-permisson
Hanpaopao 2 years ago
parent
commit
ce55497977
  1. 18
      .github/workflows/docs.yml
  2. 6
      aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/AbpProApplicationConfigurationAppService.cs

18
.github/workflows/docs.yml

@ -1,18 +0,0 @@
# name: Docs
# on:
# push:
# branches:
# - main
# jobs:
# build-docs-and-deploy:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout 🛎️
# uses: actions/checkout@v2
# with:
# persist-credentials: false
# - name: Deploy docs 🚀
# uses: mhausenblas/mkdocs-deploy-gh-pages@master
# env:
# GITHUB_TOKEN: ${{ secrets.TOKEN }}
# CONFIG_FILE: docs/mkdocs.yml

6
aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/AbpProApplicationConfigurationAppService.cs

@ -213,6 +213,12 @@ public class AbpProApplicationConfigurationAppService : ApplicationService, IAbp
if (currentPolicyValue.Value == PermissionGrantResult.Granted)
{
result.Add(currentPolicy);
// 获取上级code
var parent = currentPolicy.Split('.', StringSplitOptions.RemoveEmptyEntries);
if (parent.Length > 1)
{
result.Add(parent[0]);
}
}
result.AddRange(GetPolicy(currentPolicy, permissions));

Loading…
Cancel
Save