Open Closed

Dynamic Permission #4814


User avatar
0
brad created
  • ABP Framework version: v7.0.0

  • UI type: Blazor Server

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): yes

  • Exception message and stack trace: We found that there is no difference between v6.0 and v7.0 about dynamic permission.We want to know how to add a service into microservices through dynamic permission, as you have published in v7.0.But we could not find useful information about sepatated permission service.It still use v6.0 style to add new service , need to integrate the contract layer into Administrator service.

  • Steps to reproduce the issue:"


9 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can create a 6.0 and 7.0 microservice template for comparison. You will see the AdministrationServiceHttpApiHostModule no longer references ApplicationContracts.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    https://docs.abp.io/en/commercial/latest/startup-templates/microservice/add-microservice#updating-administration-microservice

    You can ignore the section of Updating Administration Microservice when you add a new service because the dynamic permission is working.

  • User Avatar
    0
    brad created

    Thanks for your advice.It is exactly as you said.So does it mean that I add some permissons which will be stored in permission database automatically?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Yes, it's.

  • User Avatar
    0
    brad created

    Hi, We got a new question.How to update or delete the permission in microservice?We have tried to edit the permission in code,but nothing happened,it added a new permisson.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    It looks like a problem, I will check it tomorrow.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I didn't find this problem, can you share a minimal project that can reproduce the problem with me? thanks. shiwei.liang@volosofot.com

  • User Avatar
    0
    brad created

    Hi, I do not think it is a problem.My question is how to edit or delete a permission of microservice.I could not find any information in docs.I have tried to edit the permission in PermissionProvider, or delete the permission,but the permission still stay in permission database and show in permission Manager UI.So I want to know how to update or delete the permissions which are stored in database.BTW I do not want do it in database directly.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    It's hard to automatically remove permissions since they come from multiple modules, so you need to manually configure the permissions that need to be deleted.

    For example:

    Configure<AbpPermissionOptions>(options=>
    {
       options.DeletedPermissions.Add("Permission name should be removed.") 
    });
    
Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15