Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct capabilities #90

Open
PhMemmel opened this issue Apr 19, 2024 · 1 comment
Open

Use correct capabilities #90

PhMemmel opened this issue Apr 19, 2024 · 1 comment
Labels

Comments

@PhMemmel
Copy link
Member

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
@PhMemmel
Copy link
Member Author

PhMemmel commented May 2, 2024

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.

@PM84 PM84 added the accepted label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants