archetecture security fix

This commit is contained in:
root
2026-06-11 03:22:12 -04:00
parent 6def9993da
commit 9483750161
3126 changed files with 177194 additions and 37211 deletions
@@ -4,9 +4,12 @@ namespace App\Services\Administrator;
use App\Models\Configuration;
use Carbon\Carbon;
use Illuminate\Support\Facades\Schema;
class AdministratorSharedService
{
protected ?bool $teacherClassHasSemesterColumn = null;
public function __construct(
protected Configuration $configuration
) {
@@ -150,4 +153,13 @@ class AdministratorSharedService
return count(array_unique($ids));
}
public function teacherClassSupportsSemester(): bool
{
if ($this->teacherClassHasSemesterColumn !== null) {
return $this->teacherClassHasSemesterColumn;
}
return $this->teacherClassHasSemesterColumn = Schema::hasColumn('teacher_class', 'semester');
}
}