moodle / moodle/devdocs

[docs] Error in access

Open
#1,496 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug documentation help wanted needs-triage
Dominant language
TypeScript
Stars
74
Forks
652
Avg merge
2d 50m
Merged PRs (30d)
12

Description

What is the URL of the page?

https://moodledev.io/docs/4.1/apis/subsystems/access

What is the issue with this page?

In the table, contextlevel states

This capability can be checked with contexts that are at a lower level (e.g. moodle/site:accessallgroups could be checked with CONTEXT_MODULE).

However I do not believe this is true.

I tested this locally and regardless of what is set there, they can be checked anywhere. The only thing this seems to affect it how the permissions are grouped on pages like /admin/roles/check.php (e.g. via https://github.com/moodle/moodle/blob/8316779bd99bbf9f447b7244bc914452170f7eba/public/lib/accesslib.php#L4741-L4764 - which is only used for display)

Are you able to provide a patch for this?

Yes - I will create one

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the access API page and inspect the contextlevel row, then compare its claim with the linked public/lib/accesslib.php lines 4741-4764. Confirm how the setting affects permission checks versus display grouping. Done means the table accurately describes that behavior and the documentation link remains consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authorization, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.