Proje: Okul Platform · Hub: Okul Platform — Domain
SchoolCommentPolicy B2B Metodları
viewAnyCustomer
isCustomerWithPaidSchool()— Ücretli okulu olan müştericheckContentAccess()— O okula içerik erişimi var mı
replyCustomer
Cevap verme kuralları:
- isCustomerWithPaidSchool() → Ücretli okul zorunlu
- Yorum onaylı olmalı (
parentComment.status = true) - Sadece ana yoruma cevap (
replied_id = null) — İç içe yanıt yok (tek seviye) - Content access →
checkContentAccess(school_id)
B2B Yorum Görüntüleme Akışı
GET /customer/school-comments
→ Gate::authorize('viewAnyCustomer')
→ Sadece erişilen okullara ait onaylı yorumlar
Tek Seviyeli Cevap (Single-Level Reply)
if ($parentComment->replied_id !== null) {
return false; // Cevaba cevap verilemez
}B2B vs Admin Yorum İzinleri
| Admin | B2B | |
|---|---|---|
| Görüntüle | VIEW_COMMENT permission | Ücretli okul + content access |
| Cevapla | Yok (B2B-only) | isCustomerWithPaidSchool + content access |
| Onaylama | APPROVE_COMMENT | Yok |
Related
- api-school-comment-moderation — Yorum onay/red sistemi
- api-customer-user-service — isCustomerWithPaidSchool, checkContentAccess