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

[moodle/role:switchroles] permission needs/forces [moodle/role:assign] to be granted

    XMLWordPrintable

    Details

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

      Description

      If you grant [moodle/role:switchroles] to any role, without granting [moodle/role:assign] to that role, the "Change rol to..." combo does not appear, even if you grant the necesary assignments in the "allow role assignments" or "allow role overrides" tabs.

      In my opinion, both permissions relate to very different "capabilities" in a semantic way, although internally I understand that Moodle does a temporal "role assignment" when you "switch roles".

      But, it's very common, mostly using external enrolment on a database, that someone could want any role to be able to switch to a lower role (usually "student"), but don't want to be able to assing that role to users (since they come from the external enrolment database).

      Anyway, if those options are related (ie., you need to grant one for the other to work), it should at least be forced internally, or unified in one option, or at least documented

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              javier.guerrero Javier Guerrero
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: