check id on update (#393)
This commit is contained in:
parent
78a359407d
commit
c2f993ddf2
|
@ -45,7 +45,8 @@ service cloud.firestore {
|
|||
match /contracts/{contractId} {
|
||||
allow read;
|
||||
allow update: if request.resource.data.diff(resource.data).affectedKeys()
|
||||
.hasOnly(['description', 'closeTime', 'tags', 'lowercaseTags']);
|
||||
.hasOnly(['description', 'closeTime', 'tags', 'lowercaseTags'])
|
||||
&& resource.data.id == request.auth.uid;
|
||||
allow update: if isAdmin();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user