규칙은 아래와 같이 강의 내용데로 적었는데
문제가 뭘까요? help paleas
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// match /{document=**} {
// allow read: if true;
// allow write: if request.auth !=null;
// } 모든 문서
match /user/{docid}{
allow read,write : if true;
}
match /chatroom/{docid}/messages/{docid2} {
allow read,write : if true;
}
match /chatroom/{docid}{
allow read,write : if true;
}
match /product/{docid}{
allow read : if true ;
allow create : if request.auth !=null;
// allow update : if true
allow update : if request.auth.uid == resource.data.uid
}
}
}
에러내용은 아래와 같습니다.
Uncaught (in promise) FirebaseError: Missing or insufficient permissions.
at new qr (prebuilt.js:184:9)
at prebuilt.js:10609:34
at yr.<anonymous> (prebuilt.js:10561:21)
at Kt (eventtarget.js:351:23)
at jt (eventtarget.js:481:12)
at vr.ta (webchannelbasetransport.js:368:3)
at Qe (webchannelbase.js:2219:25)
at Ue (channelrequest.js:822:7)
at N.Da (channelrequest.js:703:5)
at N.bb (channelrequest.js:564:10)
qr @ prebuilt.js:184
(anonymous) @ prebuilt.js:10609
(anonymous) @ prebuilt.js:10561
Kt @ eventtarget.js:351
jt @ eventtarget.js:481
vr.ta @ webchannelbasetransport.js:368
Qe @ webchannelbase.js:2219
Ue @ channelrequest.js:822
N.Da @ channelrequest.js:703
N.bb @ channelrequest.js:564
Kt @ eventtarget.js:351
jt @ eventtarget.js:481
Bn @ xhrio.js:884
N.Za @ xhrio.js:841
N.Aa @ xhrio.js:824
이상