feat: replace gate verification with verification logs for Admin PG and restrict gate inspection to gate officers

This commit is contained in:
Wahyudin
2026-10-13 14:54:50 +07:00
parent 40d44a631f
commit 342d03722e
6 changed files with 578 additions and 14 deletions
+9 -2
View File
@@ -124,10 +124,17 @@ class AuthenticationTest extends TestCase
$this->actingAs($qmaUser)->get('/hse/employees')->assertStatus(403);
$this->actingAs($qmaUser)->get('/pg/guards')->assertStatus(403);
// 4. Admin PG dapat akses modul PG guards & gate inspection, ditolak dari HSE
// 4. Admin PG dapat akses modul PG guards & log verifikasi, ditolak dari pos gerbang verifikasi & HSE
$this->actingAs($pgUser)->get('/pg/guards')->assertStatus(200);
$this->actingAs($pgUser)->get('/pg/gate-inspection')->assertStatus(200);
$this->actingAs($pgUser)->get('/pg/verification-logs')->assertStatus(200);
$this->actingAs($pgUser)->get('/pg/gate-inspection')->assertStatus(403);
$this->actingAs($pgUser)->get('/hse/employees')->assertStatus(403);
// 5. Petugas Satpam Pos Gerbang dapat akses verifikasi pos gerbang, ditolak dari master guards & logs
$gateOfficer = User::where('role', 'gate_officer')->first();
$this->actingAs($gateOfficer)->get('/pg/gate-inspection')->assertStatus(200);
$this->actingAs($gateOfficer)->get('/pg/guards')->assertStatus(403);
$this->actingAs($gateOfficer)->get('/pg/verification-logs')->assertStatus(403);
}
/**