Firestore 보안 규칙 · 테스트 브랜드 표기 FANUZU 적용
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
rules_version = '2';
|
||||
|
||||
// Fancake — Firestore 보안 규칙 (2주차 설계본 v0.1)
|
||||
// FANUZU — Firestore 보안 규칙 (2주차 설계본 v0.1)
|
||||
//
|
||||
// 근거
|
||||
// - wireframe/handoff/rbac-summary.md 역할 3종 · 운영자 등급 3단계(D-18)
|
||||
@@ -381,7 +381,7 @@ service cloud.firestore {
|
||||
match /posts/{postId} {
|
||||
allow read: if signedIn();
|
||||
// 교차검증 F-05 — 예전에는 authorUid·likeCount·visibility 3개만 봐서
|
||||
// ① authorName 을 "Fancake 운영팀"으로 적어 사칭 ② commentCount 위조
|
||||
// ① authorName 을 "FANUZU 운영팀"으로 적어 사칭 ② commentCount 위조
|
||||
// ③ 소속하지 않은 팬덤 피드에 글 삽입이 가능했다. 화이트리스트 + 원본 대조로 닫는다.
|
||||
allow create: if authorIsSelf()
|
||||
&& request.resource.data.keys().hasOnly([
|
||||
|
||||
@@ -326,7 +326,7 @@ describe('F-05 — 작성자 표시명 사칭 회귀', () => {
|
||||
setDoc(doc(dbFor('alice'), 'posts/forged'), {
|
||||
fandomId: 'fandom-a',
|
||||
authorUid: 'alice',
|
||||
authorName: 'Fancake 운영팀',
|
||||
authorName: 'FANUZU 운영팀',
|
||||
body: 'forged',
|
||||
imageUrls: [],
|
||||
likeCount: 0,
|
||||
@@ -342,7 +342,7 @@ describe('F-05 — 작성자 표시명 사칭 회귀', () => {
|
||||
await assertFails(
|
||||
setDoc(doc(dbFor('alice'), 'posts/post-1/comments/forged'), {
|
||||
authorUid: 'alice',
|
||||
authorName: 'Fancake 운영팀',
|
||||
authorName: 'FANUZU 운영팀',
|
||||
body: 'forged',
|
||||
visibility: 'visible',
|
||||
createdAt: '2026-08-08T00:00:00Z',
|
||||
@@ -355,7 +355,7 @@ describe('F-05 — 작성자 표시명 사칭 회귀', () => {
|
||||
await assertFails(
|
||||
setDoc(doc(dbFor('alice'), 'questions/question-1/answers/forged'), {
|
||||
authorUid: 'alice',
|
||||
authorName: 'Fancake 운영팀',
|
||||
authorName: 'FANUZU 운영팀',
|
||||
body: 'forged',
|
||||
sourceUrls: [],
|
||||
accepted: false,
|
||||
|
||||
@@ -19,7 +19,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(tester.takeException(), isNull);
|
||||
expect(find.text('Fancake'), findsOneWidget);
|
||||
expect(find.text('FANUZU'), findsOneWidget);
|
||||
// 시안 S-A-LOGIN 의 소셜 버튼 4종이 라벨 그대로 있다.
|
||||
for (final provider in SocialProvider.values) {
|
||||
expect(find.text(provider.label), findsOneWidget, reason: provider.name);
|
||||
|
||||
Reference in New Issue
Block a user