I want to give write/update access to only one field from my firestore database collection without requesting the auth service. My rules for firestore is:
service cloud.firestore {
match /databases/{database}/documents {
match /businesses/{businessId} {
allow read;
allow write: if request.auth.uid != null;
}
}
}
My database structure for businesses
is:
addedBy: string;
address: string;
category: string;
claim: boolean;
city: string;
email: string;
id: string;
likes: number;
location: {
_lat: number,
_long: number
};
name: string;
ocHours: [{
day: string,
from: string,
status: string,
to: string
}];
phone: number;
sponsored: boolean;
state: string;
status: string;
verificationCode: string;
I want to update only the claim
field without request.auth.uid != null
.
Any suggestions?