MDL-58220 oauth2: Remove is_system_account_setup_supported

This was left from an earlier branch but no longer useful.
This commit is contained in:
Damyon Wiese 2017-03-28 11:28:10 +08:00
parent 5b0b35c096
commit 7949b3b2ac
2 changed files with 5 additions and 15 deletions

View file

@ -122,13 +122,11 @@ class renderer extends plugin_renderer_base {
$systemauth = $OUTPUT->pix_icon('no', get_string('systemaccountnotconnected', 'tool_oauth2'), 'tool_oauth2'); $systemauth = $OUTPUT->pix_icon('no', get_string('systemaccountnotconnected', 'tool_oauth2'), 'tool_oauth2');
} }
if ($issuer->is_system_account_setup_supported()) { $params = ['id' => $issuer->get('id'), 'action' => 'auth'];
$params = ['id' => $issuer->get('id'), 'action' => 'auth']; $authurl = new moodle_url('/admin/tool/oauth2/issuers.php', $params);
$authurl = new moodle_url('/admin/tool/oauth2/issuers.php', $params); $icon = $OUTPUT->pix_icon('auth', get_string('connectsystemaccount', 'tool_oauth2'), 'tool_oauth2');
$icon = $OUTPUT->pix_icon('auth', get_string('connectsystemaccount', 'tool_oauth2'), 'tool_oauth2'); $authlink = html_writer::link($authurl, $icon);
$authlink = html_writer::link($authurl, $icon); $systemauth .= ' ' . $authlink;
$systemauth .= ' ' . $authlink;
}
$systemauthstatuscell = new html_table_cell($systemauth); $systemauthstatuscell = new html_table_cell($systemauth);

View file

@ -171,14 +171,6 @@ class issuer extends persistent {
return (!empty($this->get('clientid')) && !empty($this->get('clientsecret'))); return (!empty($this->get('clientid')) && !empty($this->get('clientsecret')));
} }
/**
* Does this OAuth service support system authentication?
* @return boolean
*/
public function is_system_account_setup_supported() {
return true;
}
/** /**
* Do we have a refresh token for a system account? * Do we have a refresh token for a system account?
* @return boolean * @return boolean