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

Switch role cleanup

    XMLWordPrintable

    Details

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

      Description

      Current switch role implementation is not always reliable. We should fix the capability loading by moving it to load_all_capabilitites(), pruning the existing permissions from all roles and overrides in the target context before applying the default user role.

      We should not allow admin to switch roles, because it can not work properly and also document the potential problems when user has other roles assigned above the course context because they might produce unexpected results.

      Time needed: cca 8 hours

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                skodak Petr Skoda
                Reporter:
                skodak Petr Skoda
                Tester:
                Nobody
                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:
                0 Start watching this issue

                Dates

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