Open Closed

Custom claims and custom polices #8926


User avatar
0
jmalla.cp created
  • ABP Framework version: v6.0.1
  • UI Type: MVC
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Tiered
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hi,

We have an aplication to manage farms and their pig breedings. The farmer can see one or more farms, and inside each farm, they can see one or more breedings.

I would like to hide some menu items depending on wich farm or breeding the farmer has selected.

  • Basic permissions can't achieve this because the are applied per user
  • Features can't achieve this because they are applied globally or per tenant

I'm trying to add a dynamic claim when the farmer select a farm and breeding to apply a specific permission, but I can't find any information on how to configure dynamic claims and use custom authorization policies.

Could some one help me?

Thanks


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

    hi

    You can refer to :

    https://github.com/abpframework/abp/pull/10152#issue-1007619207 https://abp.io/community/articles/switching-between-organization-units-i5tokpzt

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 16, 2025, 12:13