Restrict user access based on the status of task

I’ve created a new post here Prevent user access to all endpoints based on the status of task