Get rid of obsolete option "disablelogin" in lib/db/version.php

Bug #1526076 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Aaron Wells

Bug Description

There's some very old code in the Mahara upgrader that looks at $config->disablelogin in the lib/db/version.php file, to determine whether user logins should be disabled during the upgrade.

I think the intent behind adding this, was to allow the version.php to indicate whether the upgrade is a big enough change that users need to be logged out during it. This makes a certain sense if used in combination with strict discipline in testing and updating $config->minupgradefrome.

However, in practice, we've had "disablelogin" set to true since 2008. And given how many Mahara versions there are now, it's safer just to force users to log out, as we have been doing for the past 7 years.

So I think it'd be best to remove this bit of code, since we never use it.

Tags: refactoring
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5851

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5851
Committed: https://git.mahara.org/mahara/mahara/commit/0284f9abba564a0680b831fafe7cba1f7988c379
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 0284f9abba564a0680b831fafe7cba1f7988c379
Author: Aaron Wells <email address hidden>
Date: Tue Dec 15 14:40:49 2015 +1300

Removing obsolete "disablelogin" setting

Bug 1526076: I believe the initial intent was that
Mahara core, and/or each plugin, could add a value
to its version.php file indicating "disablelogin"
true or false. And in this way, an upgrade could
indicate whether it was a small enough upgrade that
users did not need to log out for it.

However, in practice this is not practical because
we don't know what version of Mahara the user is
upgrading from, and that is what determines whether
or not it's a "stable" upgrade.

Additionally, the core disablelogin has been set to true
for the past 7 years, and the plugin disablelogin
setting no longer has any effect.

Removing disablelogin should hopefully make our
maze of init.php auth_setup() login stuff a little
bit easier to follow.

behatnotneeded: Covered by existing tests

Change-Id: I5f8a2b4faa95b9225bb926de6a54a622ea1a9618

Robert Lyon (robertl-9)
Changed in mahara:
status: Confirmed → Fix Committed
Aaron Wells (u-aaronw)
Changed in mahara:
assignee: nobody → Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Committed → 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.