Skip to content

Commit 762733a

Browse files
committed
Fix section error in auth_oidc confirmation page for new installations
1 parent f1b8d55 commit 762733a

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

classes/form/application.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ protected function definition() {
7777
$authmethodoptions = [
7878
AUTH_OIDC_AUTH_METHOD_SECRET => get_string('auth_method_secret', 'auth_oidc'),
7979
];
80-
if ($this->_customdata['oidcconfig']->idptype == AUTH_OIDC_IDP_TYPE_MICROSOFT) {
80+
if (isset($this->_customdata['oidcconfig']->idptype) &&
81+
$this->_customdata['oidcconfig']->idptype == AUTH_OIDC_IDP_TYPE_MICROSOFT) {
8182
$authmethodoptions[AUTH_OIDC_AUTH_METHOD_CERTIFICATE] = get_string('auth_method_certificate', 'auth_oidc');
8283
}
8384
$mform->addElement('select', 'clientauthmethod', auth_oidc_config_name_in_form('clientauthmethod'), $authmethodoptions);

lang/en/auth_oidc.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@
147147
<li>If Azure AD is used as the IdP, additional profile data can be made available by installing and configuring the <a href="https://moodle.org/plugins/local_o365">Microsoft 365 integration plugin (local_o365)</a>.</li>
148148
<li>If SDS profile sync feature is enabled in the local_o365 plugin, certain profile fields can be synchronised from SDS to Moodle. when running the "Sync with SDS" scheduled task, and will not happen when running the "Sync users with Azure AD" scheduled task, nor when user logs in.</li>
149149
</ul>';
150-
$string['error_incomplete_basic_settings'] = 'Missing basic settings.';
151150
$string['settings_section_basic'] = 'Basic settings';
152151
$string['settings_section_authentication'] = 'Authentication';
153152
$string['settings_section_endpoints'] = 'Endpoints';

manageapplication.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@
5252

5353
$oidcconfig = get_config('auth_oidc');
5454

55-
// If "idptype" or "clientid" is not set, we are not ready to configure application authentication.
56-
if (!isset($oidcconfig->idptype) || empty($oidcconfig->idptype) || !isset($oidcconfig->clientid) || empty($oidcconfig->clientid)) {
57-
redirect(new moodle_url('/admin/settings.php', ['section' => 'auth_oidc_basic_settings']),
58-
get_string('error_incomplete_basic_settings', 'auth_oidc'));
59-
}
60-
6155
$form = new application(null, ['oidcconfig' => $oidcconfig]);
6256

6357
$formdata = [];

0 commit comments

Comments
 (0)