I'm working on a website that assigns different roles to different users - and I'm looking a functionality I would probably best describe as 'reverse access control':
First, users of role "A" are allowed to publish content of type "A". If a user changes to role "B" he/she is not longer allowed to publish content of type "A".
Now I would want to find a way to 'unpublish' or 'hide' whatever that user has published while he/she was still assigned the user role "A". Currently I can think of the following two possible approaches:
- All posts are still published, but only the author and admins can see it.
- All posts are unpublished when the user role changes.
To me approach 1 sounds more practical – so in case the user switches back to role "A" everything would instantly be visible again.
I had a look at various plugins such as Members and User Role Editor but none seems to have that type of functionality – or am I missing something completely? Any pointers would be appreciated. Thank you!