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

For non-admin user the site administration categories are displayed as links that show errors

XMLWordPrintable

    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_38_STABLE
    • MDL-67523-master
    • Hide
      • Assign role "Manager" to a user in the system context
      • Log in as this user
      • Go to Site administration
      • Click on categories names (i.e. "Users", "Badges", etc), make sure they display the list of subsections and only the subsections available to this user are displayed
      • Login as admin and find some category that is not available for the Manager, for example "Plugins>Activity modules", copy the URL
      • Login as manager and go to this URL, make sure you see an error
      Show
      Assign role "Manager" to a user in the system context Log in as this user Go to Site administration Click on categories names (i.e. "Users", "Badges", etc), make sure they display the list of subsections and only the subsections available to this user are displayed Login as admin and find some category that is not available for the Manager, for example "Plugins>Activity modules", copy the URL Login as manager and go to this URL, make sure you see an error

      • Assign role "Manager" to a user in the system context
      • Log in as this user
      • Go to Site administration
      • All sections names are displayed as links but clicking on them shows an exception

      Sorry, but you do not currently have permissions to do that (Change site configuration).
       
      More information about this error
      Debug info:
      Error code: nopermissions
      Stack trace:
       
          line 860 of /lib/accesslib.php: required_capability_exception thrown
          line 3064 of /lib/moodlelib.php: call to require_capability()
          line 33 of /admin/category.php: call to require_admin()
      

      We either need to not throw an exception or not show them as links

        1. category_Link_works_and_shows_allowed_sections.png
          21 kB
          Eloy Lafuente (stronk7)
        2. forbidden_secion_throws_error.png
          34 kB
          Eloy Lafuente (stronk7)

            marina Marina Glancy
            marina Marina Glancy
            Paul Holden Paul Holden
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 5 minutes
                1h 5m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.