firestore security only for one document code example
Example: firebase ! [W] undefined:undefined - Ruleset uses old version (version [1]). Please update to the latest version (version [2]).
service firebase.storage {
match /b/{bucket}/o {
match /user-files/{uid}/{allPaths=**} {
allow read: if resource.metadata[request.auth.uid] == "1";
allow create, update: if request.auth.uid == uid
&& request.auth.token.storageLeft >= request.resource.size
&& request.auth.token.path == request.resource.name
allow delete: if false;
}
}
}