Open Closed

[Customization] - Hide certain user roles in "User Edit" popup #5567


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

Hi Support Team,

I would like to ask if there is a way to hide away "Junior" & "Senior" in the "User" => "Edit" popup as below: If there is any, could you show me how this could be achieved?

Hope to hearing from you guys soon.

Thanks.


3 Answer(s)
  • User Avatar
    0
    jfistelmann created

    Hey,

    you would need to override the following for that: Module: Identity.Pro IOrganizationUnitAppService.GetRolesAsync(..)

    and apply your logic

  • User Avatar
    0
    trannguyenphucanh created

    Hi jfistelmann,

    Thank you for your supporting. But the breakpoint did not get hit in the overridden method.

    Could you take a look at my implementation to see if I missed any step?

    Other method is otherwise working well:

    Edit: I found the solution, it is the method IIdentityUserAppService.GetAssignableRolesAsync(...) to be overridden, its API is api/identity/users/assignable-roles.

    Anyway, thank you for the suggestion. One last thing: How do I achieve the UI like this?

  • User Avatar
    0
    jfistelmann created

    Happy to hear that you solved it :)

    in order to change the UI you need to change this here, coming from the Volo.Abp.Identity.Pro Module:

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