Skip to content

[docs] Security/capability checks in [reportbuilder] #1414

Description

@RussellEngland

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions