Issue Details (XML | Word | Printable)

Key: MDL-15863
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Iñaki Arenaza
Reporter: Chris Fryer
Votes: 1
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Cannot set auth type using IMS Enterprise plugin

Created: 28/Jul/08 10:28 PM   Updated: 04/Sep/08 07:03 PM
Return to search
Component/s: Enrolments
Affects Version/s: 1.9, 1.9.1, 1.9.2
Fix Version/s: None

File Attachments: 1. Text File imse_enrol.patch (4 kB)

Issue Links:
Duplicate
 
Relates
 

Database: Any
Participants: Chris Fryer and Iñaki Arenaza
Security Level: None
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
The IMS Enterprise enrolment plugin allows you to create accounts, and set the user's auth type to $CFG->auth

File: /enrol/imsenterprise/enrol.php
Line: 647

$person->auth = $CFG->auth;

However, since the multiauth changes, $CFG->auth returns a comma-separated list of enabled auth plugins. The effect is, for example, to set mdl_user.auth to 'ldap,manual' rather than one or the other. This means the user cannot log in.

I'm really not sure how to address this. It's not possible to specify the authorisation method in the IMS document; or at least your IMS document wouldn't be compliant anymore.

I've marked this as "Major" because it's going to affect some large institutions come October.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Chris Fryer added a comment - 01/Aug/08 06:20 PM
OK, I've given it some thought, and here's a patch that allows you to choose the default authentication method for newly-created users from a drop-down list. It appears on /admin/enrol_config.php?enrol=imsenterprise

Seems to work. I'd appreciate some feedback.


Chris Fryer made changes - 01/Aug/08 06:20 PM
Field Original Value New Value
Attachment imse_enrol.patch [ 14734 ]
Iñaki Arenaza made changes - 03/Aug/08 11:48 PM
Assignee Nobody [ nobody ] Iñaki Arenaza [ iarenaza ]
Iñaki Arenaza added a comment - 03/Aug/08 11:57 PM
(Added Petr Skodak as a watcher, so he can give his opinion on this)

Chris, I think the bug appears in this commit: http://cvs.moodle.org/moodle/enrol/imsenterprise/enrol.php?r1=1.8&r2=1.8.6.1&pathrev=MOODLE_18_STABLE

Instead of chaning the authentication value, we changed the language value. So I'd say that commit should have read like this:

$person->lang = $CFG->lang;
$person->auth = 'manual';

Of course, that imposes 'manual' authentication to all users created by the IMS Enrolment plugin, which may or may not be a good idea. This is exactly where I'd like Petr to share his opinion on the issue. Should we hardcode 'manual' or should we have a configurable value like Chris' patch allows? I'd favor the latter, but I'd like to have a second opinion on this.

Saludos. Iñaki.


Chris Fryer made changes - 05/Aug/08 06:05 PM
Link This issue has a non-specific relationship to MDL-15864 [ MDL-15864 ]
Chris Fryer added a comment - 05/Aug/08 06:05 PM
> Of course, that imposes 'manual' authentication to all users created
> by the IMS Enrolment plugin, which may or may not be a good idea.

I've linked this to a related issue, which may help you decide. It's possible to specify a password in a "person" object in IMS Enterprise. In that case, it would make sense to set the auth type to manual. I think it's better to allow administrators to choose an authentication method for users who don't have a password in the IMS document.

There is a conflict between the patches in each issue. MDL-15864 has

if (!isset($person->auth)) $person->auth = $CFG->auth

while MDL-15863 (this bug) has

if(!isset($person->auth)) $person->auth = $CFG->enrol_imse_defaultauth;

Not difficult to resolve, but I thought I'd let you know in case you decide to incorporate the patches into the core.


Chris Fryer made changes - 04/Sep/08 07:03 PM
Link This issue is duplicated by MDL-16339 [ MDL-16339 ]