mebis-lp/moodle-mod_mootimeter

Use correct capabilities

Opened this issue · 1 comments

The external functions currently are not checking the necessary capabilities. There are some checks later on, but it should be reworked like this:

  • Directly after validating the context in the external function there should be the appropriate capability check, this will usually be require_capability('mod/mootimeter:view', $modulecontext);
  • The enrol check like classes/local/pagelist.php:72 will not be needed anymore and should be removed
  • Check these for all external functions

Added capability check for mod/mootimeter:view on all external functions and removed the enrol checks with 33484b0

Moving all cap checks to the upper level of the external functions is still a todo.