Hi Maciej,
I'm not so sure this is a good idea. It might be perfectly valid to assign a task to a user that is not in the candidate group. For example, all the users in the candidate group are unavailable and the process owner reassigns the task to a temp. It is easy enough to query the candidate group and limit the assignment to them only if that is the desired functionality for your application/process.
Cheers
Walter