Moodle

Ability to prevent users changing their password has vanished

Details

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

Description

Hi - the $CFG->restrictusers feature was removed from Moodle because the roles system was supposed to cover this. However it doesn't: there seems to be no way to prevent a user changing their password.

I'm filing this as a bug rather than a feature request because there may well be sites who were using the $CFG->restrictusers feature to provide "demo" accounts (like moodle.org used to do), and who are presumably now unable to do this. A site that I'm working on needs to have a certain class of user unable to edit their password or other details, for example.

I'd guess that there should be a capability for can-edit-own-password, default on.

(Removing of $CFG->restrictusers was a tracker item but I can't seem to find it, sorry.)

Issue Links

Activity

Hide
Petr Škoda (skodak) added a comment -

should be fixed in cvs, you can now create new 'restricted' role and assign it to users in the system context.

Show
Petr Škoda (skodak) added a comment - should be fixed in cvs, you can now create new 'restricted' role and assign it to users in the system context.
Hide
Petr Škoda (skodak) added a comment -

thanks for the report,
the new capabilities are:

'moodle/user:editownprofile'
'moodle/user:changeownpassword'

Show
Petr Škoda (skodak) added a comment - thanks for the report, the new capabilities are: 'moodle/user:editownprofile' 'moodle/user:changeownpassword'
Hide
Helen Foster added a comment -

Thanks Petr, works perfectly

http://docs.moodle.org/en/Demo_teacher_role

Show
Helen Foster added a comment - Thanks Petr, works perfectly http://docs.moodle.org/en/Demo_teacher_role
Hide
Samuli Karevaara added a comment -

Do I understand correctly that this bug was fixed for 1.9 only? No backport to 1.8? That would be unfortunate, as the $CFG->restrictusers was removed in 1.8 (or 1.7?). I'll dig into the diff to see if the backport is an easy one...

Show
Samuli Karevaara added a comment - Do I understand correctly that this bug was fixed for 1.9 only? No backport to 1.8? That would be unfortunate, as the $CFG->restrictusers was removed in 1.8 (or 1.7?). I'll dig into the diff to see if the backport is an easy one...
Hide
Samuli Karevaara added a comment -

Aw, it's 10 changed files + requires a db stamp upgrade (because of the added profiles). I'll pass with the backport as I don't want to break 1.8

Show
Samuli Karevaara added a comment - Aw, it's 10 changed files + requires a db stamp upgrade (because of the added profiles). I'll pass with the backport as I don't want to break 1.8

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: