role, ['superuser', 'manager']); } /** * Determine whether the user can update the model. */ public function update(User $user, TeamMember $teamMember): bool { // Only superusers and managers can update team members return in_array($user->role, ['superuser', 'manager']); } /** * Determine whether the user can delete the model. */ public function delete(User $user, TeamMember $teamMember): bool { // Only superusers and managers can delete team members return in_array($user->role, ['superuser', 'manager']); } /** * Determine whether the user can restore the model. */ public function restore(User $user, TeamMember $teamMember): bool { // Only superusers and managers can restore team members return in_array($user->role, ['superuser', 'manager']); } /** * Determine whether the user can permanently delete the model. */ public function forceDelete(User $user, TeamMember $teamMember): bool { // Only superusers can force delete team members return $user->role === 'superuser'; } /** * Determine whether the user can view utilization data. * * All authenticated users can view utilization data. */ public function viewUtilization(User $user): bool { return true; } /** * Determine whether the user can view running utilization. */ public function viewRunningUtilization(User $user): bool { return true; } /** * Determine whether the user can view overall utilization. */ public function viewOverallUtilization(User $user): bool { return true; } /** * Determine whether the user can view team utilization. */ public function viewTeamUtilization(User $user): bool { return true; } /** * Determine whether the user can view team running utilization. */ public function viewTeamRunningUtilization(User $user): bool { return true; } /** * Determine whether the user can view utilization trend. */ public function viewUtilizationTrend(User $user): bool { return true; } }