I need help identifying the best way to organize the necessary capabilities to use a plugin.
I created a plugin that allows user1 to register and enrol other users on Moodle on the same course as user1. To use this plugin, user1 must have all of the following capabilities:
- enrol/manual:enrol
- moodle/role:assign
- moodle/course:enrolreview
- moodle/user:create
I want to know if this is the best approach. Maybe should I create a custom capability in db/access.php and test for it instead of all four capabilities above?
I appreciate any help you can give me.
Thank you.