Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-7968

check_access not defined in class part_of_admin_tree

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.9.2
    • Component/s: Roles / Access
    • Labels:
      None
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      I wanted to set up a "researcher" role, who would have access to view information about our users and run reports, but not have any site configuration permissions. So I copied the admin role and switched off a few bits and pieces.

      When I tested it, I expected to see a cut down tree in the site admin block and be able to directly access report urls. However, I see no block, and get an access denied error if I call the reports directly.

      I've tracked it through the code, and it appears to be because there's a call to check_access in the part_of_admin_tree class in adminlib.php. This function simply throws a warning because it hasn't been implemented yet. The display code interprets this as return false and so doesn't think the user has the appropriate capabilities.

      There's a complicated comment for the function which appears to explain what should be done, but I'm not sure I understand it, so I didn't want to try to offer an implementation based on it.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Jul/08