Merge branch 'MDL-79241-master' of https://github.com/marinaglancy/moodle
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
namespace tool_mfa\plugininfo;
|
||||
|
||||
use moodle_url;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
@@ -292,4 +293,47 @@ class factor extends \core\plugininfo\base {
|
||||
global $DB;
|
||||
return $DB->get_record('tool_mfa', ['id' => $factorid]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return URL used for management of plugins of this type.
|
||||
*
|
||||
* @return moodle_url
|
||||
*/
|
||||
public static function get_manage_url(): moodle_url {
|
||||
return new moodle_url('/admin/settings.php', [
|
||||
'section' => 'managemfa',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* These subplugins can be uninstalled.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_uninstall_allowed(): bool {
|
||||
return $this->name !== 'nosetup';
|
||||
}
|
||||
|
||||
/**
|
||||
* Pre-uninstall hook.
|
||||
*
|
||||
* This is intended for disabling of plugin, some DB table purging, etc.
|
||||
*
|
||||
* NOTE: to be called from uninstall_plugin() only.
|
||||
* @private
|
||||
*/
|
||||
public function uninstall_cleanup() {
|
||||
global $DB, $CFG;
|
||||
|
||||
$DB->delete_records('tool_mfa', ['factor' => $this->name]);
|
||||
$DB->delete_records('tool_mfa_secrets', ['factor' => $this->name]);
|
||||
|
||||
$order = explode(',', get_config('tool_mfa', 'factor_order'));
|
||||
if (in_array($this->name, $order)) {
|
||||
$order = array_diff($order, [$this->name]);
|
||||
\tool_mfa\manager::set_factor_config(['factor_order' => implode(',', $order)], 'tool_mfa');
|
||||
}
|
||||
|
||||
parent::uninstall_cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Supports from 4.2.
|
||||
$plugin->component = 'factor_admin';
|
||||
$plugin->release = 'v0.1';
|
||||
$plugin->requires = 2023042400.00; // Requires this Moodle version.
|
||||
$plugin->component = 'factor_admin'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->dependencies = ['tool_mfa' => 2023080300];
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Supports from 4.2.
|
||||
$plugin->component = 'factor_auth';
|
||||
$plugin->release = 2021020500;
|
||||
$plugin->requires = 2023042400.00; // Requires this Moodle version.
|
||||
$plugin->component = 'factor_auth'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->dependencies = ['tool_mfa' => 2023080300];
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Supports from 4.2.
|
||||
$plugin->component = 'factor_capability';
|
||||
$plugin->release = 'v0.1';
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Requires this Moodle version.
|
||||
$plugin->component = 'factor_capability'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->dependencies = ['tool_mfa' => 2023080300];
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Supports from 4.2.
|
||||
$plugin->component = 'factor_cohort';
|
||||
$plugin->release = 'v0.2';
|
||||
$plugin->requires = 2023042400.00; // Requires this Moodle version.
|
||||
$plugin->component = 'factor_cohort'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->dependencies = ['tool_mfa' => 2023080300];
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Supports from 4.2.
|
||||
$plugin->component = 'factor_email';
|
||||
$plugin->release = 'v0.1';
|
||||
$plugin->requires = 2023042400.00; // Requires this Moodle version.
|
||||
$plugin->component = 'factor_email'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->dependencies = ['tool_mfa' => 2023080300];
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Supports from 4.2.
|
||||
$plugin->component = 'factor_grace';
|
||||
$plugin->release = 'v0.1';
|
||||
$plugin->requires = 2023042400.00; // Requires this Moodle version.
|
||||
$plugin->component = 'factor_grace'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->dependencies = ['tool_mfa' => 2023080300];
|
||||
|
||||
@@ -25,9 +25,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Supports from 4.2.
|
||||
$plugin->component = 'factor_iprange';
|
||||
$plugin->release = 'v0.1';
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Requires this Moodle version.
|
||||
$plugin->component = 'factor_iprange'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->dependencies = ['tool_mfa' => 2023080300];
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Supports from 4.2.
|
||||
$plugin->component = 'factor_nosetup';
|
||||
$plugin->release = 'v0.1';
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Requires this Moodle version.
|
||||
$plugin->component = 'factor_nosetup'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->dependencies = ['tool_mfa' => 2023080300];
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Supports from 4.2.
|
||||
$plugin->component = 'factor_role';
|
||||
$plugin->release = 'v0.1';
|
||||
$plugin->requires = 2023042400.00; // Requires this Moodle version.
|
||||
$plugin->component = 'factor_role'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->dependencies = ['tool_mfa' => 2023080300];
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Supports from 4.2.
|
||||
$plugin->component = 'factor_token';
|
||||
$plugin->release = 2022011700;
|
||||
$plugin->requires = 2023042400.00; // Requires this Moodle version.
|
||||
$plugin->component = 'factor_token'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->dependencies = ['tool_mfa' => 2023080300];
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->release = 2021021700;
|
||||
$plugin->requires = 2023042400.00; // Supports from 4.2.
|
||||
$plugin->component = 'factor_totp';
|
||||
$plugin->requires = 2023042400.00; // Requires this Moodle version.
|
||||
$plugin->component = 'factor_totp'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->dependencies = ['tool_mfa' => 2023080300];
|
||||
|
||||
@@ -25,9 +25,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->release = 2023062900;
|
||||
$plugin->requires = 2023042400.00; // Supports from 4.2.
|
||||
$plugin->component = 'factor_webauthn';
|
||||
$plugin->maturity = MATURITY_ALPHA;
|
||||
$plugin->dependencies = ['tool_mfa' => 2023080300];
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2023042400.00; // Requires this Moodle version.
|
||||
$plugin->component = 'factor_webauthn'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
|
||||
@@ -148,13 +148,13 @@ $string['settings:weight_help'] = 'The weight of this factor if passed. A user n
|
||||
$string['setup'] = 'Setup';
|
||||
$string['setupfactor'] = 'Setup factor';
|
||||
$string['setuprequired'] = 'User setup';
|
||||
$string['subplugintype_factor'] = 'Factor type';
|
||||
$string['subplugintype_factor_plural'] = 'Factor types';
|
||||
$string['state:fail'] = 'Fail';
|
||||
$string['state:locked'] = 'Locked';
|
||||
$string['state:neutral'] = 'Neutral';
|
||||
$string['state:pass'] = 'Pass';
|
||||
$string['state:unknown'] = 'Unknown';
|
||||
$string['subplugintype_factor'] = 'Factor type';
|
||||
$string['subplugintype_factor_plural'] = 'Factor types';
|
||||
$string['totalusers'] = 'Total users';
|
||||
$string['totalweight'] = 'Total weight';
|
||||
$string['userempty'] = 'User cannot be empty.';
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2023080300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->release = 2023080100; // Same as version.
|
||||
$plugin->requires = 2023042400.00; // Supports from 4.2.
|
||||
$plugin->component = 'tool_mfa';
|
||||
$plugin->requires = 2023042400.00; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_mfa'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
|
||||
Reference in New Issue
Block a user