The Group module allows for creating arbitrary collections of your content and users on your site, and grant access control permissions on those collections. It is available as of D7, and has a D8 version also. It is designed to be an alternative to Organic Groups. The Group module creates groups as entities, making them fully fieldable, extensible and exportable.
For this specific question, you'd enable the gnode
submodule, and for each group type you would define the appropriate permissions (view, edit, delete, etc) for the various Content Types. That's it.
For more details about the various types of roles used by the Group module, refer to my answer to "http"https://drupal.stackexchange.com/questions/197493".