devdocs
devdocs copied to clipboard
[docs] Security/capability checks in [reportbuilder]
What is the Moodle feature that needs documenting?
versioned_docs/version-5.0/apis/core/reportbuilder
Could you add documentation for security/capability checks please :)
I think to restrict access to a data entity it is the is_available function?
eg: in local/myplugin/classes/reportbuilder/local/entities/mydata.php
public function is_available(): bool {
return has_capability('local/myplugin:viewreport', context_system::instance());
}
Is this documentation specific to a Moodle version?
None
Are you able to provide a patch for this?
None