-<?php namespace BookStack\Auth\Access;
+<?php
+
+namespace BookStack\Auth\Access;
use BookStack\Auth\Role;
use BookStack\Auth\User;
-use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Collection;
-use Illuminate\Support\Facades\DB;
class ExternalAuthService
{
}
$roleName = str_replace(' ', '-', trim(strtolower($role->display_name)));
+
return in_array($roleName, $groupNames);
}
}
/**
- * Sync the groups to the user roles for the current user
+ * Sync the groups to the user roles for the current user.
*/
public function syncWithGroups(User $user, array $userGroups): void
{