cakephp / authorization

PSR7 Middleware for authorization
MIT License
76 stars 46 forks source link

skipAuthorization doesn't work when using RequestPolicy #122

Closed anuix closed 3 years ago

anuix commented 4 years ago

Hello,

I`m using CakePHP4 and I noticed that $this->Authorization->skipAuthorization(); placed in an action doesn't work when using RequestPolicy.

I have a simple RequestPolicy that retrieves some access rows from the database based on the user's group.

Can you help me with this?

Thank you!

othercorey commented 3 years ago

RequestAuthorizationMiddleware checks when the middleware is processed. It is not processed in the component like other policies.