diff --git a/firestore.rules b/firestore.rules index f8cc148c..1dc4fd37 100644 --- a/firestore.rules +++ b/firestore.rules @@ -50,7 +50,9 @@ service cloud.firestore { match /contracts/{contractId} { allow read; allow update: if request.resource.data.diff(resource.data).affectedKeys() - .hasOnly(['description', 'closeTime', 'tags', 'lowercaseTags']) + .hasOnly(['tags', 'lowercaseTags']); + allow update: if request.resource.data.diff(resource.data).affectedKeys() + .hasOnly(['description', 'closeTime']) && resource.data.creatorId == request.auth.uid; allow update: if isAdmin(); }