Open Closed

How can I customize Roles page to prevent deleting a role that has already been assigned to a user? #915


User avatar
0
ErenSongur created

I am trying to delete a role, but if it has been assigned to a user it should not be deleted. Will this issue be solved in future releases, or is there any way to intercept and override the warning message in order to prevent deletion?

  • ABP Framework version: v4.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: N/A
  • Steps to reproduce the issue: Identity Management -> Roles -> Delete role (Make sure a user has this role before)

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

    hi

    You can override the role's application service method to prevent it from being deleted.

    https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Guide#overriding-services-components

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

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