Open Closed

Extend AbpUserRoles #96


User avatar
0
bhyatz created

I have extended abpuserroles to include Active and Inactive dates so a user will only have a role between these dates.

However I found several places where the user roles are used in the code. However I can't find the place where the roles are assigned to the user when he logs in.

I need to change the login so that only roles that are active are assigned to a user when he logs in. Where do I modify this logic?


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

    What is your UI? (Angular or razor page) Are you using identity server?

  • User Avatar
    0
    bhyatz created

    I am using identity server and the ui is angular.

    I have currently implemented this by extending the Volo.Abp.Identity.IdentityUser and updating GetRolesAsync,IsInRoleAsync and GetActiveRoles to filter only the active roles. I am not sure if this is the best way or not.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi bhyatz

    I think this is ok.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on June 20, 2025, 11:20