Commit 091285cf authored by Aaron Wells's avatar Aaron Wells
Browse files

Disable Persona/browserid auth if not in use (Bug 1541173)

Because Persona is going to be decommissioned by Mozilla in
November 2016, we want to discourage new sites from using it.
An easy way to do that, is to disable it for newly installed
sites, or when upgrading sites where it is not yet in use.

behatnotneeded: Can't be tested in behat

Change-Id: I7a986d8610a7bed0e7e1968912a242320b8ac44f
parent ac434eff
......@@ -280,6 +280,17 @@ EOF;
public static function need_basic_login_form() {
return false;
}
public static function postinst($fromversion) {
// Deactivate for new installs or if not in use.
if ($fromversion == 0 || 0 == count_records('auth_instance', 'authname', 'browserid')) {
set_field('auth_installed', 'active', 0, 'name', 'browserid');
}
}
public static function can_be_disabled() {
return true;
}
}
class BrowserIDUser extends LiveUser {
......
......@@ -11,7 +11,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2012011000;
$config->release = '1.0.0';
$config->version = 2016020900;
$config->release = '1.0.1';
$config->requires_config = 1;
$config->requires_parent = 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment