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

Web Service auth_email_signup_user is not setting correctly the policyagreed to 1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.3.5, 3.4.2, 3.5
    • Fix Version/s: 3.3.6, 3.4.3
    • Component/s: Privacy
    • Labels:
    • Testing Instructions:
      Hide

      Setup

      1. Log-in as admin in your local site
      2. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      3. Go to Site administration > Plugins >Authentication > Manage authentication and Enable the "E-mail based self-registration" plugin, in the same page scroll down to "Self registration " to set there "E-mail based self-registration"
      4. Go to Site administration > Privacy and policies > Policy settings and set "Site policy handler" to "Default (core)"
      5. Check that both "Site policy URL" and "Site policy URL for guests" are empty (if they are not empty, leave them empty deleting the current value)

      Testing scenario 1 - No policies

      1. Open the Mobile app and add the URL to your local site
      2. Go to the option "Create a new account"
      3. Create a new user account
      4. Log-in with the new user account credentials in your local web site
        • CHECK that you are not asked to accept a site policy

      Testing scenario 2 - tool_core defined

      1. Log-in as admin in your local site
      2. Then go to Site administration > Privacy and policies > Policy settings
      3. Make sure the "Site policy handler" is set to "Default (core)"
      4. Set a "Site policy URL" (it can be a link to just https://www.moodle.org)
      5. Now, open the Mobile app and add the URL to your local site
      6. Go to the option "Create a new account"
      7. Create a new user account
      8. Log-in with the new user account credentials in your local web site
        • CHECK that you are not asked to accept the site policy

      Testing scenario 3 - tool_policy defined

      1. Log-in as admin on your local site again
      2. If you're on 34 and 33, install the tool_policy plugin:
      3. Then go to Site administration > Privacy and policies > Policy settings
      4. Set "Site policy handler" to "Policies (tool_policy)"
      5. Create and make Active at least one "Site policy" in the site via Site administration > Privacy and policies > Manage policies > New policy
      6. Now, open the Mobile app and add the URL to your local site
      7. Go to the option "Create a new account"
      8. Create a new user account
      9. Log-in with the new user account credentials in your local web site
        • CHECK that you are not asked to accept the site policy
      Show
      Setup Log-in as admin in your local site Enable "Mobile services": Site administration ► Mobile app ► Mobile settings Go to Site administration > Plugins >Authentication > Manage authentication and Enable the "E-mail based self-registration" plugin, in the same page scroll down to "Self registration " to set there "E-mail based self-registration" Go to Site administration > Privacy and policies > Policy settings and set "Site policy handler" to "Default (core)" Check that both "Site policy URL" and "Site policy URL for guests" are empty (if they are not empty, leave them empty deleting the current value) Testing scenario 1 - No policies Open the Mobile app and add the URL to your local site Go to the option "Create a new account" Create a new user account Log-in with the new user account credentials in your local web site CHECK that you are not asked to accept a site policy Testing scenario 2 - tool_core defined Log-in as admin in your local site Then go to Site administration > Privacy and policies > Policy settings Make sure the "Site policy handler" is set to "Default (core)" Set a "Site policy URL" (it can be a link to just https://www.moodle.org ) Now, open the Mobile app and add the URL to your local site Go to the option "Create a new account" Create a new user account Log-in with the new user account credentials in your local web site CHECK  that you are not asked to accept the site policy Testing scenario 3 - tool_policy defined Log-in as admin on your local site again If you're on 34 and 33, install the tool_policy plugin: 34 : https://moodle.org/plugins/download.php/16506/tool_policy_moodle34_2017111306.zip 33 : https://moodle.org/plugins/download.php/16505/tool_policy_moodle33_2017051514.zip Download the zip files and extract to admin/tool. Then go to Site administration > Privacy and policies > Policy settings Set "Site policy handler" to "Policies (tool_policy)" Create and make Active at least one "Site policy" in the site via Site administration > Privacy and policies > Manage policies > New policy Now, open the Mobile app and add the URL to your local site Go to the option "Create a new account" Create a new user account Log-in with the new user account credentials in your local web site CHECK that you are not asked to accept the site policy
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull from Repository:
    • Pull 3.4 Branch:
    • Pull Master Branch:
      MDL-62175-master

      Description

      MDL-61477 introduced a change in the external function core_auth_external:email_signup_user to replace the old if !empty($CFG->sitepolicy) check with the new privacy manager defined check. The problem is that was replaced incorrectly with the negative check so now is behaving contrary to expected.

      See https://github.com/moodle/moodle/commit/1727c939ba2a9498aaa2caf438f243860f54dd23#diff-44dd56610fe1e6bbff0776a368da5cbaL290

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  17/May/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 7 hours
                  7h