Extend preview to support cohorted courseware

This is a version of #6140, on top of Jim's access control PR.
Could you document what MASQUERADE_SETTINGS_KEY looks like?