번역 평가 버튼 · 내 퀘스트 검토 버튼 · MY 질문 상세 · MY 완료 퀘스트 수 · 행성/성운 칸 · 라운지 빈 상태 수정
This commit is contained in:
@@ -328,6 +328,13 @@ service cloud.firestore {
|
||||
allow write: if false;
|
||||
}
|
||||
|
||||
// 검증 활동 표식(`fpi.ts` markCompletion). MY 「완료 퀘스트」가 본인 표식 수를 센다(count 집계).
|
||||
// 표식은 Campaign·Quest 개설자격의 근거라 서버만 쓴다. 화면: S-M-HOME
|
||||
match /users/{uid}/verifiedCompletions/{completionId} {
|
||||
allow read: if isSelf(uid) || isViewer();
|
||||
allow write: if false;
|
||||
}
|
||||
|
||||
// 약관 동의 이력. 개인정보 처리 근거의 입증 자료라 append-only 이고 클라이언트가 쓰지 못한다.
|
||||
// 본인은 자기 동의 이력을 볼 수 있어야 한다(열람권). 화면: S-A-TERMS · S-M-SETTINGS
|
||||
match /users/{uid}/consents/{consentId} {
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
collectionGroup,
|
||||
deleteDoc,
|
||||
doc,
|
||||
getCountFromServer,
|
||||
getDoc,
|
||||
getDocs,
|
||||
orderBy,
|
||||
@@ -267,6 +268,20 @@ describe('가입 목록 — users/{uid}/memberships (C-15)', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('검증 활동 표식 — users/{uid}/verifiedCompletions (MY 완료 퀘스트)', () => {
|
||||
beforeEach(async () => {
|
||||
await seedDocuments(testEnvironment, {
|
||||
'users/alice/verifiedCompletions/q1_20261005': { questId: 'q1' },
|
||||
});
|
||||
});
|
||||
|
||||
test('본인만 세고 누구도 직접 쓰지 못한다', async () => {
|
||||
await assertSucceeds(getCountFromServer(collection(dbFor('alice'), 'users/alice/verifiedCompletions')));
|
||||
await assertFails(getDocs(collection(dbFor('bob'), 'users/alice/verifiedCompletions')));
|
||||
await assertFails(setDoc(doc(dbFor('alice'), 'users/alice/verifiedCompletions/q2_20261005'), { questId: 'q2' }));
|
||||
});
|
||||
});
|
||||
|
||||
describe('G-02 — 약관 동의 이력 무결성 회귀', () => {
|
||||
beforeEach(async () => {
|
||||
await seedDocuments(testEnvironment, {
|
||||
|
||||
Reference in New Issue
Block a user