Skip to content

Releases: ampatspell/firerules

add `this.unquoted(string)`

18 Oct 02:17
Compare
Choose a tag to compare
this.prop('owner').type('string').value(this.unquoted('request.auth.uid')).writable();
request.resource.data.owner == request.auth.uid

Adds `if(this.affected(path), ...)`

15 Oct 17:26
Compare
Choose a tag to compare
this.update(function() {
  this.if(this.affected('pdf'), function() {
    this.map('pdf').type(null).optional().writable();
  });
});
(
  "pdf" in request.resource.data.diff(resource.data).affectedKeys() &&
  !("pdf" in request.resource.data.keys())
) ||
(
  !request.resource.data.diff(resource.data).affectedKeys().hasAny([ "pdf" ])
)