Allow role to edit node with same taxonomy term
A few year's back, I had to do this for a D7 site with 100s of content providers that could only post in specific areas.  Did this by have a protected section taxonomy field on the user profile.

Then used hook_node_access to test if the node had a term that matched on of them on the user profile.

That's the basics.

I think I had to do a custom validator for the node create form to check that they were creating nodes with approved terms.

I also think the node create form and edit forms had the term lists cut down to just allowed terms by using a view as the source of the selection list.

Sorry for being general, I haven't worked on that site for years and don't have the code anymore.