Skip to content

Commit

Permalink
Allow people with the role "Leitung" in a "Ehemalige" group to login …
Browse files Browse the repository at this point in the history
…as unitleader
  • Loading branch information
tobifra committed Apr 10, 2024
1 parent 222d028 commit 11f98ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/app/Http/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 11f98ba

Please sign in to comment.