Open Closed

Permission Dependency #3745


User avatar
0
shobhit created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v4.2.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

How we can setup permission dependency?

  • Module1
    • Create
    • Update
    • Delete
  • Module2
    • Create
    • Update
    • Delete

In above permission hierarchy if "module1 --> Create" checked we would like also to check "module2 --> create and Update" permission as both have internal api dependency. How we can achieve this.


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

    Hi,

    Tip: Prefer to use the Authorize attribute wherever possible, since it is declarative & simple. Use IAuthorizationService if you need to conditionally check a permission and run a business code based on the permission check.

    See: https://docs.abp.io/en/abp/latest/Authorization#iauthorizationservice

    For complex scenarios, you need to manually check permissions

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38