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:
    • Testing Instructions:
      Hide
      1. Go to 'Permissions' in the settings for any activity.
      2. Verify that the capabilities moodle/site:accessallgroups, moodle/site:viewfullnames, moodle/site:trustconten and moodle/site:viewuseridentity are all listed there.
      3. Check Permissions in the course settings.
      4. Verify that those four capabilities appear alongside all the rest.
      Show
      Go to 'Permissions' in the settings for any activity. Verify that the capabilities moodle/site:accessallgroups, moodle/site:viewfullnames, moodle/site:trustconten and moodle/site:viewuseridentity are all listed there. Check Permissions in the course settings. Verify that those four capabilities appear alongside all the rest.
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull Master Branch:

      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

              Assignee:
              timhunt Tim Hunt
              Reporter:
              timhunt Tim Hunt
              Peer reviewer:
              Jason Platts
              Integrator:
              Jake Dallimore
              Tester:
              Anna Carissa Sadia
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              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