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

Query issues in filter_users_with_capability_on_user_context_sql

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: Competencies
    • Labels:
      None

      Description

      I've identified a few problems here:

      1. The first column may not be unique (rc.id can be used in more than 1 context)
      2. The capability check seems to be missing
      3. ctx.id contextid should be ctx.id AS contextid (I think)
      4. That doesn't seem to work when a role is given in a user context
        • Create a role
        • Allow a capability just in that role (not in system)
        • Assign that role in a user
        • Confirm that the user is returned by the query

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              fred Frédéric Massart
              Reporter:
              fred Frédéric Massart
              Peer reviewer:
              Damyon Wiese
              Participants:
              Component watchers:
              Damyon Wiese, Jean-Philippe Gaudreau, Steve Massicotte, Serge Gauthier, Issam Taboubi, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: