Açık Kapalı

Extend AbpUserRoles #96


User avatar
0
bhyatz oluşturuldu

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 Cevap
  • User Avatar
    0
    maliming oluşturuldu
    Destek Takımı Fullstack Developer

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

  • User Avatar
    0
    bhyatz oluşturuldu

    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 oluşturuldu
    Destek Takımı Fullstack Developer

    hi bhyatz

    I think this is ok.

Made with ❤️ on ABP v8.2.0-preview Updated on Mart 25, 2024, 15:11