memi-board 0.38.0 → 0.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist/index.js +216 -205
- package/dist/index.js.map +1 -1
- package/docs/firebase-setup.md +2 -0
- package/docs/storage.rules.example +12 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -548,6 +548,22 @@ App Check 토큰, `appId` 일치, 모델명(3.x), AI Logic 활성화, 네트워
|
|
|
548
548
|
3. 호스트 `storage.rules`에 `docs/storage.rules.example`의 `memiBoardPosts/{postId}/images` 규칙이 있는지 확인. 쓰기는 `image/*` 이어야 한다(붙여넣기 PNG).
|
|
549
549
|
4. `firebase deploy --only storage` 후 다시 올려 본다.
|
|
550
550
|
|
|
551
|
+
### 글 삭제 `storage/unauthorized`
|
|
552
|
+
|
|
553
|
+
작성자 본인 글 삭제가 `User does not have permission to access 'memiBoardPosts/{postId}'` 로 실패하면, 파일 삭제가 아니라 **폴더 목록(`listAll`)** 이 막힌 것이다.
|
|
554
|
+
|
|
555
|
+
요청은 `prefix=memiBoardPosts/{postId}/`(끝 슬래시)다. `match /memiBoardPosts/{postId} { allow list }` 만 있으면 이 접두사와 안 맞는다. 호스트 `storage.rules`에 예시와 같은 블록이 있어야 한다.
|
|
556
|
+
|
|
557
|
+
```
|
|
558
|
+
match /memiBoardPosts/{postId}/{allPaths=**} {
|
|
559
|
+
allow list, get: if true;
|
|
560
|
+
allow delete: if isSignedIn()
|
|
561
|
+
&& (!postExists(postId) || isPostOwner(postId) || isBoardStaff());
|
|
562
|
+
}
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
`write` 는 이 블록에 넣지 않는다(용량·`image/*` 제한은 `images`/`attachments` match 가 담당). `firebase deploy --only storage` 후 다시 삭제한다. 0.38.1+ 패키지는 `images/`·`attachments/`만 목록으로 비운다.
|
|
566
|
+
|
|
551
567
|
### monorepo `link:` / `file:` 로 개발할 때
|
|
552
568
|
|
|
553
569
|
링크하기 전에 패키지 의존성과 `dist`를 준비한다.
|