title: What is the correct way to use authorization policy class to authorize access to an index page in cakephp4?
body: <p>I developed a few cakephp3 apps, and now I'm learning how to use cakephp4. I'm trying to centralize all my authorization logic in the *Policy classes. I have a situation where a user wants to access a entity/index page, and I want to validate if he can access this index page by doing some queries.</p>
  
  <p>So right now I'm using <code>$this-&gt;Authorization-&gt;authorize($this-&gt;Entity-&gt;newEmptyEntity());</code> in the controller, in order to be able to access an <code>EntityPolicy-&gt;canIndex()</code> method. Is there a more elegant way to do it, to call a policy method without an instance of the entity?</p>
  
  <p>After that, in order to be able to run my queries, I'm using the ModelAwareTrait in the class, and querying data in a similar way that I do in controllers. Is there a better approach?</p>