Self deletion of users relies on institution registration which follows additional rules

Bug #495064 reported by Andrew Nicols
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Unassigned

Bug Description

Version: master

Having a look at the new self delete features, I've come across a bug:

Ability to delete self is determined by the registration status of the
institutions a user belongs to. If that institution has registration
enabled, then that user may delete their profile.

However, this check on user registration is based solely on the
registerallowed field in the institution table whilst the registration page
(register.php) checks whether the institution has an 'internal' auth
instance associated with it; and only then do they allow registration to
that institution.

The patch I've supplied only allows self deletion of users who have logged
in using the internal auth mechanism, in addition to the existing check on
registration being enabled.

Revision history for this message
Andrew Nicols (dobedobedoh) wrote :
Changed in mahara:
assignee: nobody → Richard Mansfield (richard-mansfield)
milestone: none → 1.2.3
Revision history for this message
Richard Mansfield (richard-mansfield) wrote :

I just had a look at this, and I'm not sure that this patch is exactly the right thing to do. For one thing, it's possible for a user to have an authinstance of 'none', in which case there's no reason why they shouldn't be able to delete themselves.

But you also get the situation where the user has an xmlrpc authinstance whose parent authinstance is internal, so that the user can come in from Moodle but also log in at the Mahara login form. I expect that in most of these cases the institution would have registerallowed turned off, but if it was turned on it's kind of weird to determine self-deleting ability on whether they logged in first on the moodle or the mahara side.

Personally I'm not too worried about leaving things the way they are, but if this makes anyone really unhappy I think the simplest solution might be to just add a 'userscanselfdelete' setting to the institution and use that instead of registerallowed. That would force institutions to have a single policy on self-deleting for all their users, but at least it would reduce confusion.

Changed in mahara:
milestone: 1.2.3 → none
Revision history for this message
Andrew Nicols (dobedobedoh) wrote :

I've added an option to both the site options page, and the institution
settings page which allows you to choose whether users may delete
themselves or not. As a result, I've removed the check on registration
status of the institutions.

An institution can override the site preference in either direction, or
choose to follow the site default. If any one institution for the user opts
to disable user deletion, deletion is disabled for that user.

This change uses the institution preferences code I wrote recently (not in
master yet) so other than the database change required for the institution
preferences system itself, no other db change is required.

Located in git at http://git.luns.net.uk/mahara.git on branch
institution-selfdelete which is based upon the
institution-settings_noexample branch

Changed in mahara:
importance: Undecided → Low
Changed in mahara:
status: New → Confirmed
Revision history for this message
François Marier (fmarier) wrote :

Andrew, is this still outstanding or have we merged that on master already?

Changed in mahara:
assignee: Richard Mansfield (richard-mansfield) → nobody
Revision history for this message
Robert Lyon (robertl-9) wrote :

The patch was never added to core - still an outstanding issue.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

This was implemented in Mahara 18.04.

Changed in mahara:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.