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

Non-admins can add admin bookmarks block

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8
    • Component/s: Blocks
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      A non-admin user on their My Moodle page finds the "Admin bookmarks" block listed in the drop-down menu of available blocks to add. It should only be shown for admin users.

      When a non-admin user selects to add this block the following debug info is printed:

      Error: Invalid context creation request for level "50", instance "3".

      • line 1675 of lib\accesslib.php: call to debugging()
      • line 1833 of lib\accesslib.php: call to create_context()
      • line 2980 of lib\accesslib.php: call to get_context_instance()
      • line 3867 of lib\accesslib.php: call to get_parent_contexts()
      • line 1688 of lib\accesslib.php: call to insert_context_rel()
      • line 1833 of lib\accesslib.php: call to create_context()
      • line 297 of blocks\moodleblock.class.php: call to get_context_instance()
      • line 319 of lib\blocklib.php: call to block_base->_add_edit_controls()
      • line 49 of my\index.php: call to blocks_print_group()

        Attachments

          Activity

            People

            • Assignee:
              dougiamas Martin Dougiamas
              Reporter:
              delius Gustav W Delius
              Tester:
              Nobody
              Participants:
              Component watchers:
              Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                31/Mar/07