Plugin: Azure: adapt order for role verification to have first admin, then teacher to avoid setting a teacher role to an admin - refs BT#21500

pull/5763/head
Nicolas Ducoulombier 1 year ago committed by GitHub
parent f5d563c361
commit df28327bba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      plugin/azure_active_directory/src/callback.php

@ -97,10 +97,9 @@ try {
$azureGroups = $provider->get('me/memberOf', $token);
foreach ($azureGroups as $azureGroup) {
$azureGroupUid = $azureGroup['objectId'];
foreach ($roleGroups as $userRole => $groupUid) {
foreach ($roleGroups as $userRole => $groupUid) {
foreach ($azureGroups as $azureGroup) {
$azureGroupUid = $azureGroup['objectId'];
if ($azureGroupUid === $groupUid) {
$roleActions[$userRole]($user);

Loading…
Cancel
Save