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

moodle/site:viewuseridentity & others are relevant to all contexts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.4, 2.7.1, 3.4.5, 3.5.2, 3.6.1
    • Fix Version/s: 3.5.4, 3.6.2
    • Component/s: Roles / Access
    • Labels:

      Description

      To reproduce.

      1. Go to any quiz (to pick just one relevant example).
      2. Do Administration -> Check permissions for any user.

      Expected result: moodle/site:viewuseridentity capability is listed, because it affects what can be seen in the quiz reports, or log report.

      Actual result: permisisons for that capability is not shown.

      Because this affects the logs report, it is relevant to all contexts, so it probably needs to be fixed in context_module::get_capabilities. I guess all the context_XXX classes should be reviewed at the same time.

      The following capabilities should similarly be overridable in activity contexts:

      • moodle/site:accessallgroups
      • moodle/site:viewfullnames
      • moodle/site:trustcontent

      Having just worked on MDL-63818 and MDL-63772, I now see that the right fix is to just change the capability definition to say 'contextlevel' => CONTEXT_MODULE, for these caps, then they will show up when overriding permissions in system, course cat, course or module contexts.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jan/19

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m