diff --git a/api/app/Http/Controllers/AuthController.php b/api/app/Http/Controllers/AuthController.php index a91b2bc..c33a795 100644 --- a/api/app/Http/Controllers/AuthController.php +++ b/api/app/Http/Controllers/AuthController.php @@ -42,7 +42,10 @@ public function handleProviderCallback(Request $request) $user->assignRole('admin'); } elseif ($midata_group_ids = $this->hasRole($midataUser->user, 'Einheitsleiter*in', $groupIds)) { $user->assignRole('unitleader'); - } + } elseif ($midata_group_ids = $this->hasRole($midataUser->user, 'Leitung', $groupIds)) { + $user->assignRole('unitleader'); + } + $groups = Group::whereIn('midata_id', $midata_group_ids)->get(); $user->groups()->sync($groups);