Slide 1

Slide 1 text

CakePHP Online Meetup 2 Yes, we did it again Hosted by: Mark Story, Mark Scherer, Jorge González

Slide 2

Slide 2 text

CakePHP Meetup 2 - 'Baking a new plugin and TDD for it' by Mark Scherer ~1h - 'Authorization plugin' by Jorge González ~1h - 'Pro-Debug with Xdebug + stepping through in IDE' by Jorge González ~20m - Mark Story will be around too and might be talking about common-table-expressions...

Slide 3

Slide 3 text

Baking a new plugin And TDD for it @dereuromark, I choose you!

Slide 4

Slide 4 text

About Jorge González @steinkelz • CakePHP Developer at CakeDC [email protected] https:/ /www.cakedc.com • Trainer at Cake Software Foundation https:/ /training.cakephp.org

Slide 5

Slide 5 text

Authorization Plugin • Project setup, quick existing authentication review https:/ /github.com/CakeDC/cakephp4-unit-tests/tree/meetup 5

Slide 6

Slide 6 text

Quick dev setup when you're not doing things right https:/ /gist.github.com/steinkel/70e1051e5a60eea9d2e02839d1fe4345 Old, but still functional 6

Slide 7

Slide 7 text

Authorization plugin - Plugin setup - Basic concepts - Middleware - Resolver - Policy - Component 7

Slide 8

Slide 8 text

Creating policies - Plugin setup - Basic concepts - Middleware - Resolver - Policy - Component 8

Slide 9

Slide 9 text

Code example - Add authorization for admin/tournaments - You can add new tournaments - You can browse tournaments you are in - You can view/edit tournaments you are in - Superadmin can only delete tournaments 9

Slide 10

Slide 10 text

What if you only need RBAC - You don't want/care about fine grained permissions - You need endpoint RBAC decorated with some rules - THEN, consider some RBAC alternative - Like cakedc/auth - Like dereuromark/cakephp-tinyauth 10

Slide 11

Slide 11 text

Step by step debugging • Using your IDE to debug issues 11

Slide 12

Slide 12 text

@markstory, I choose you!

Slide 13

Slide 13 text

Lightning Talks

Slide 14

Slide 14 text

Q&A

Slide 15

Slide 15 text

Thank you for attending!