Skip to content

Commit

Permalink
MDL-76671 tool_mobile: Allow OAuth launches after accepting policies
Browse files Browse the repository at this point in the history
  • Loading branch information
jleyva committed Jan 17, 2024
1 parent 287cfcb commit 8af5f10
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions admin/tool/mobile/launch.php
Expand Up @@ -56,8 +56,9 @@

// Check if the plugin is properly configured.
$typeoflogin = get_config('tool_mobile', 'typeoflogin');
if (empty($SESSION->justloggedin) and
$typeoflogin != tool_mobile\api::LOGIN_VIA_BROWSER and
if (empty($SESSION->justloggedin) &&
!is_enabled_auth('oauth2') &&
$typeoflogin != tool_mobile\api::LOGIN_VIA_BROWSER &&
$typeoflogin != tool_mobile\api::LOGIN_VIA_EMBEDDED_BROWSER) {
throw new moodle_exception('pluginnotenabledorconfigured', 'tool_mobile');
}
Expand Down

0 comments on commit 8af5f10

Please sign in to comment.