Reassignment of user tasks to a different user within the candidate group with Camunda 7.19

I have a use case where I need to allow certain users to be able to reassign user tasks to different users within the same candidate group, If user tries to reassign to a user which is not part of the candidate group to which this user task is assigned to then this should be rejected. Is there a way we can achieve this with Camunda tasklist. I am using Camunda 7.19