tg
tg copied to clipboard
User Role: deactivation of roles should check for existence of active users
Description
It should not be possible to deactivate UserRole instance that are associated with active users.
UserRoles are associated with users via UserAndRoleAssociation, which models many-2-many association and is not activatable. A user is associated with a role if a corresponding instance UserAndRoleAssociation exists. The validation logic for deactivation of user roles should take this specificity into account.
Expected outcome
User roles deactivation to be aligned with the use of UserAndRoleAssociation for managing user-role associations.