dmirandaa / moodle-auth_saml2sso

Moodle plugin for authentication using a SimpleSAMLphp Service Provider
https://moodle.org/plugins/auth_saml2sso
0 stars 6 forks source link

Allow selection of this plugin when uploading users from csv file #31

Closed pnks closed 5 years ago

pnks commented 5 years ago

Is your feature request related to a problem? Please describe. When I upload users from a CSV file, I cannot select the authentication plugin. Because of that, acter uploading the users, I'd need to manually change the authentication plugin on all users.

Describe the solution you'd like The plugin cannot be selected because the function can_be_manually_set() in auth.php returns false. If the function returns true, the plugin can be selected on bulk user upload from CSV.

I tested the following change to the code, which worked for me:

In auth.php, the function

    function can_be_manually_set() {
        return false;
    }

Should be changed to:

    function can_be_manually_set() {
        return true;
    }

After making this change in the code, I could select the SAML2SSO plugin as the authentication plugin for users uploaded from a CSV file. I'd like to see this change made in the mainstream, so it does not get lost when I update the plugin.

mfprimo commented 5 years ago

Your change is included in 3.5.4 release.