fix(vikon): clean up corrupted CheckAccessAction file

This commit is contained in:
F4ilji
2026-07-04 19:01:05 +05:00
parent 44abdb471f
commit e502225e9c
@@ -4,7 +4,6 @@ namespace App\Containers\VikonIntegration\Actions;
use App\Containers\VikonIntegration\Tasks\HttpTask;
use App\Containers\VikonIntegration\Tasks\ValidateTokenTask;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Log;
class CheckAccessAction
@@ -63,41 +62,4 @@ class CheckAccessAction
];
}
}
}
}
private function findNonWritable(string $path, int $depth = 0): array
{
if ($depth > 3 || !is_dir($path)) return [];
$relative = str_replace(base_path() . '/', '', $path);
$excluded = ['vendor', 'node_modules', 'storage', '.git', 'bootstrap/cache', 'build', 'vikon_core'];
foreach ($excluded as $ex) {
if (str_contains($relative, '/' . $ex) || $relative === $ex || str_starts_with($relative, $ex . '/')) {
return [];
}
}
if (!is_writable($path)) {
return [$relative];
}
$result = [];
foreach (File::directories($path) as $dir) {
$result = array_merge($result, $this->findNonWritable($dir, $depth + 1));
}
return $result;
}
if (!is_writable($path)) {
return [$relative];
}
$result = [];
foreach (File::directories($path) as $dir) {
$result = array_merge($result, $this->findNonWritable($dir, $depth + 1));
}
return $result;
}
}