rwth-acis / moodle-data-proxy

3 stars 1 forks source link

[ENH] Token required functions check #21

Closed BorisJov closed 3 years ago

BorisJov commented 3 years ago
  1. Motivation - The web service functions that can be called through a token are fixed when generating a token. It can happen that a token entered in the proxy does not have all the required functions enabled. Several functions can also be custom made through a Moodle plugin, and therefore not enabled by default.
  2. Specification - For each Moodle web service function used in the proxy, the proxy should check if it is enabled for the used token. The proxy should then log the result of this check and list the missing functions.
  3. Finalised state - The proxy should function the same as before but with the addition of the function check in the initialisation phase. The log will now hold the information on which functions are not accepted by the token, if any, otherwise it will give just say everything is in order.
BorisJov commented 3 years ago

_core_webservice_get_siteinfo moodle function used to get list of enabled tokens. Static set of required functions implemented in proxy.