title: Firestore Rules: Allow or limit request to only once every 24h?
body: <p>Is there a native or efficient way to restrict the user to load a document from a collection only once every 24h? </p>
  
  <pre class="lang-js prettyprint-override"><code>//Daily Tasks
  //User should have only read rights
  //User should only be able to read one document every 24h
  
  match /tasks/{documents} {
  allow read: if isSignedIn() &amp;&amp; request.query.elapsedHours &gt; 24;
  }
  </code></pre>
  
  <p>I was thinking that I might be able to do this using a timestamp in the <em>user document</em>. But this would consume unnecessary writing resources to make a write to the <em>user document</em> with every request for a <em>task document</em>. So before I do it this way, I wanted to find out if anyone had a better approach.</p>
  
  <p>Any ideas? Thanks a lot!</p>