title: Row-level-security dual join
body: <p>I have three tables</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>journeys</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>id</td>
  </tr>
  <tr>
  <td>user_id</td>
  </tr>
  <tr>
  <td>...</td>
  </tr>
  </tbody>
  </table>
  </div><div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>sections</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>id</td>
  </tr>
  <tr>
  <td>journey_id</td>
  </tr>
  <tr>
  <td>...</td>
  </tr>
  </tbody>
  </table>
  </div><div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>stops</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>id</td>
  </tr>
  <tr>
  <td>section_id</td>
  </tr>
  <tr>
  <td>...</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to use row level security to make sure that a user can only insert a <code>stop</code> if the <code>uid()</code> matches the <code>user_id</code> on the <code>journey</code> that is referenced by the <code>stop</code> via <code>stops.section_id</code>-&gt;<code>sections.journey_id</code>-&gt;<code>journeys.user_id</code>.</p>
  <p>In other words, the user should only be able to set <code>stops.section_id</code> to a <code>section</code> and thus to a <code>journey</code> that belongs to him.</p>
  <p>How can I achieve this in Supabase with row level security joins?</p>