Compare commits

..

3 Commits

Author SHA1 Message Date
208decc6f4 app/Http/Middleware/ManagementMiddleware.php を更新
All checks were successful
Deploy so-manager (auto) / deploy (push) Successful in 23s
2026-01-16 15:34:56 +09:00
e8eca949df database/migrations/2026_01_16_144753_create_management_table.php を更新
All checks were successful
Deploy so-manager (auto) / deploy (push) Successful in 23s
2026-01-16 15:28:25 +09:00
e8d392b0d9 Merge pull request '運営元ごとのマルチテナント対応' (#53) from main_higashide into main
All checks were successful
Deploy so-manager (auto) / deploy (push) Successful in 26s
Reviewed-on: #53
2026-01-16 15:21:46 +09:00
2 changed files with 5 additions and 2 deletions

View File

@ -33,7 +33,10 @@ class ManagementMiddleware
} }
// 運営元コードの正当性検証のため、DBで存在確認 // 運営元コードの正当性検証のため、DBで存在確認
$management = DB::table('management')->where('management_code', $managementCode)->first(); $management = DB::table('management')
->where('management_code', $managementCode)
->where('valid_flag', 1) // 有効フラグが1の場合のみ
->first();
if (!$management) { if (!$management) {
// 不正アクセス防止のため、エラーログでシステム例外を記録 // 不正アクセス防止のため、エラーログでシステム例外を記録

View File

@ -17,7 +17,7 @@ return new class extends Migration
$table->string('management_code', 10)->unique(); // varchar(10), NOT NULL, UNIQUE $table->string('management_code', 10)->unique(); // varchar(10), NOT NULL, UNIQUE
$table->boolean('municipality_flag')->nullable(); // tinyint(1), NULL $table->boolean('municipality_flag')->nullable(); // tinyint(1), NULL
$table->boolean('government_approval_required')->nullable(); // tinyint(1), NULL $table->boolean('government_approval_required')->nullable(); // tinyint(1), NULL
$table->boolean('valid_flag '); // tinyint(1) $table->boolean('valid_flag'); // tinyint(1)
$table->timestamps(); // created_at, updated_at (datetime), NOT NULL $table->timestamps(); // created_at, updated_at (datetime), NOT NULL
$table->unsignedInteger('operator_id')->nullable(); // int(10), NULL $table->unsignedInteger('operator_id')->nullable(); // int(10), NULL
$table->foreign('operator_id')->references('ope_id')->on('ope'); // 外部キーopeテーブルのope_idを参照 $table->foreign('operator_id')->references('ope_id')->on('ope'); // 外部キーopeテーブルのope_idを参照