Skip to content

Commit

Permalink
Merge pull request Silvanite#56 from SGS-Optimisation/main
Browse files Browse the repository at this point in the history
give PM role to AE team
  • Loading branch information
yayann authored Jul 2, 2021
2 parents ae831cd + 313bd49 commit 59e3956
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Services/Azure/Auth/AssignRoles.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public static function handle(User $user)
'Project Manager',
'Manager',
'Chef de Projet',
'Systems Engineer',
];

foreach ($TL_titles as $title) {
Expand All @@ -43,7 +44,8 @@ public static function handle(User $user)

protected static function checkTitleStringForRole(User $user, $title, $role)
{
if (Str::contains($user->job_title, $title) || Str::contains($title, $user->job_title)) {
if (Str::contains(Str::lower($user->job_title), Str::lower($title))
|| Str::contains(Str::lower($title), Str::lower($user->job_title))) {
$user->assignRole($role);
}
}
Expand Down

0 comments on commit 59e3956

Please sign in to comment.