You can enable to course meta link enrolment plugin in Administration > Site administration > Plugins > Enrolments > Manage enrol plugins (as described in the documentation Enrolment plugins), however the method you found using a cohort sounds fine too.
Enrolment
Switching Off the Need for Enrolment
This discussion has been locked so you can no longer reply to it.