by Pablo Platt.
My plugin need to let an external web service talk to moodle. Asking the admin do all the steps manually is a bit cumbersome and much more difficult than just configuring three fields for a usual plugin. Is it ok to do the following automatically in the plugin install.php or are there technical or security issues?
- Create a webservice user
- Create a system role with the required capabilities
- Assign the system role to the user
- Give the user permission to use the web service
- Generate a token for that user
Is there an example that does a similar thing?Am I missing some steps?
Thanks