HR Task Visiblity

DASAMANDAMS
Tera Contributor

I want to restrict the visibility of HR Tasks such that only the following users can access them:

 

Members of the HR Case’s assignment group 

 

 

Users added to the HR Case watchlist

 

Members of the HR Task’s assignment group

 

I want to achieve the before business rule can someone help me with the code