feat: implementation des dossiers candidats PDF, gestion des entretiens et optimisation de l'analyse IA
This commit is contained in:
@@ -18,12 +18,9 @@ trait BelongsToTenant
|
||||
return;
|
||||
}
|
||||
|
||||
// Candidates don't have a tenant_id but must access
|
||||
// quizzes/job positions linked to their position
|
||||
if ($user->role === 'candidate') {
|
||||
return;
|
||||
}
|
||||
|
||||
// All other users (admins and candidates) are filtered by their tenant.
|
||||
// This includes candidates, who must only see data from their own organization.
|
||||
// Resources with a null tenant_id are considered global and always visible.
|
||||
if ($user->tenant_id) {
|
||||
$builder->where(function ($query) use ($user) {
|
||||
$query->where('tenant_id', $user->tenant_id)
|
||||
|
||||
Reference in New Issue
Block a user