If achieving this with a plugin is acceptable to you, an answer to a similar question recommended the Advanced Access Manager plugin.
If achieving this with a plugin is acceptable to you, an answer to a similar question recommended the Advanced Access Manager plugin.