Using drupal 7, when creating new content of the type "Document" the current user roles must be added so I can later on show only Documents of his current role.
For example, we have the following user: this is Jake, he is a Firefighter. He creates a document about the dangers and pitfalls of being a firefighter. This is only relevant for Firefighters. So in the list of documents (view) I want Jake and all other Firefighters only to see Firefighter Documents.
So if Jake create new content of the type "document" I want to add his user roles and later on add a filter in the view so only Firefighters get to see Firefighter Documents
I want to have the following filter for the list Document view:
- Published = true
- Content type = Document
- User role = current user roles (Firefighter in this case)
Access must be restricted for every user based on their role. For example, Jake the Firefighter is not allowed to view Policemen Documents