- 출석 체크 시 데일리 포인트와 주간/월간 보너스를 지급하며, 멱등성 및 클럭 오차 처리를 포함한 로직을 구현했습니다. - 포인트 이력 관리를 위한 `pointLedger` 컬렉션과 잔액 추적 리포지토리를 추가했습니다. - 사용자별 알림 슬롯에 맞춰 FCM 출석 독려 푸시를 발송하는 스케줄러와 설정 API를 도입했습니다. - RTDB의 희소 배열 응답을 7일 기준 배열로 정규화하여 통계 데이터의 일관성을 강화했습니다. - 출석 시스템 전반에 대한 단위 및 통합 테스트를 추가하여 안정성을 확보했습니다.
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
rules_version='2'
|
|
|
|
service cloud.firestore {
|
|
match /databases/{database}/documents {
|
|
match /users/{uid} {
|
|
allow read: if request.auth != null && request.auth.uid == uid;
|
|
allow update: if request.auth != null && request.auth.uid == uid &&
|
|
request.resource.data.diff(resource.data)
|
|
.affectedKeys().hasOnly(['fcmToken']);
|
|
allow create, delete: if false;
|
|
|
|
match /voteHistory/{date} {
|
|
allow read: if request.auth != null && request.auth.uid == uid;
|
|
allow write: if false;
|
|
}
|
|
|
|
match /attendance/{month} {
|
|
allow read: if request.auth != null && request.auth.uid == uid;
|
|
allow write: if false;
|
|
}
|
|
|
|
match /pointLedger/{id} {
|
|
allow read: if request.auth != null && request.auth.uid == uid;
|
|
allow write: if false;
|
|
}
|
|
}
|
|
|
|
match /games/{gameId} {
|
|
allow read: if true;
|
|
allow write: if false;
|
|
}
|
|
|
|
match /kboCache/{key} {
|
|
allow read: if true;
|
|
allow write: if false;
|
|
}
|
|
|
|
match /kboLocks/{key} {
|
|
allow read, write: if false;
|
|
}
|
|
|
|
match /{document=**} {
|
|
allow read, write: if false;
|
|
}
|
|
}
|
|
}
|