Have a look at the [Group][1] module (commonly perceived as an alternative for [Organic Groups][2]).

[Group][1] 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. The [Group][1] module creates groups as entities, making them fully fieldable, extensible and exportable. Which also makes it integrate very well (out of the box) with commonly used modules such as [Rules](https://www.drupal.org/project/rules), [Views](https://www.drupal.org/project/views), etc.

Some more questions you may want to look at for more details:

- https://drupal.stackexchange.com/questions/197493, which explains the various types of roles that can be used. 
- https://drupal.stackexchange.com/questions/197489, a typical issue when adding this module to an existing site).
- https://drupal.stackexchange.com/questions/197618

# Resources

- [Community documentation for the Group module][3].
- Video tutorial "[How to use the Group module in Drupal 8 to manage editorial access control to different areas of a web site][4]".


  [1]: https://www.drupal.org/project/group
  [2]: https://www.drupal.org/project/og
  [3]: https://www.drupal.org/node/2666972
  [4]: https://m.youtube.com/watch?v=GkiCLJk5n0s