Ends in:
2 DAYS
5 HRS
11 MIN
39 SEC
Ends in:
2 D
5 H
11 M
39 S
Open Closed

How to check if a granted permission exist in a role using permission checker #8419


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

using permission checker how do i use IsGrantedAsyn function to pass permission name and role to check if permission exists or not in the specified role?


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

    hi

    
    IPermissionStore PermissionStore;
    
    var result = await PermissionStore.IsGrantedAsync(permissionName, RolePermissionValueProvider.ProviderName, roleName);
    
  • User Avatar
    0
    smansuri created

    thanks, We are trying to store some user info like Branches : [{"Id":123, "Roles:['admin','user']},{"Id":113, "Roles:['subadmin','user']}] as object globally for filter purpose. Could you please suggest best way to integrate this in abp framework. storing this in access token looks incorrect as the information can have more arrays. We need to apply this filter with each db query like imultitenant filter. Filter is im clear how to implement.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please create a new question for the Filter question.

    Thanks.

  • User Avatar
    0
    smansuri created

    hi

    Please create a new question for the Filter question.

    Thanks.

    thanks created : https://abp.io/support/questions/8423/How-to-implement-a-branch-filter-like-imlutitenancy-under-a-tenant

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35