title: How to add search params to Yii2 restfull api via ActiveController?
body: <p>Im configured an API via default <code>ActiveController</code> extend. All works fine, I get all the data. But I need to receive the data of a specific user. Somehow like</p>
  
  <pre><code>Items::find()-&gt;andWhere(['user_id'=&gt;Yii::app-&gt;user-&gt;id])
  </code></pre>
  
  <p>but in all actions in my API (<code>GET view</code>, <code>POST update</code>, etc). Also, I need to check - can this user change or get this row or not.</p>
  
  <p>How I'd see it:</p>
  
  <ol>
  <li><p>Model default work - I'll set a param in model, so model default work will use required search params;</p></li>
  <li><p>I'm using a Search model instead of normal model;</p></li>
  <li><p>Somehow to set access or modify the request via my <code>ItemController</code>, which extends <code>ActiveController</code> or somehow pass <code>params</code> to it. </p></li>
  <li><p>Override default <code>ActiveController</code> crud actions and write my own. </p></li>
  <li><p>Maybe, I should set rights and check from <code>checkAccess</code> via default <code>activecontroller</code> crud methods?</p></li>
  </ol>
  
  <p>Dunno which way is right :( </p>