inklabs / kommerce-core

PHP shopping cart core platform
https://kommerce-laravel-demo.jamieisaacs.com/
Apache License 2.0
64 stars 14 forks source link

Add authorization context to all actions #98

Closed pdt256 closed 7 years ago

pdt256 commented 7 years ago

Relates to #96

pdt256 commented 7 years ago

An authorization context will need to be added to all uses cases.

pdt256 commented 7 years ago

3 down:

egrep -R 'implements (Command|Query)HandlerInterface' src/ActionHandler|wc -l
       3

124 to go:

egrep -R 'class.*Handler$' src/ActionHandler|wc -l
     124

6 TODOs to cleanup when complete:

$ egrep -iR 'todo.*98' vendor/inklabs/kommerce-core
vendor/inklabs/kommerce-core/src/Action/User/LoginCommand.php:// TODO: Move ActionInterface to be extended by CommandInterface when #98 is complete
vendor/inklabs/kommerce-core/src/Lib/Command/CommandBus.php:            // TODO: Remove when #98 is complete
vendor/inklabs/kommerce-core/src/Lib/Command/CommandInterface.php:// TODO: Switch back when #98 is complete
vendor/inklabs/kommerce-core/src/Lib/Mapper.php:     * @param ActionInterface|CommandInterface|QueryInterface $action TODO: Switch to ActionInterface after #98
vendor/inklabs/kommerce-core/src/Lib/Mapper.php:                // TODO: Switch back when #98 is complete
vendor/inklabs/kommerce-core/tests/Lib/MapperTest.php:                // TODO: Add when #98 is complete
pdt256 commented 7 years ago

This is significantly larger than planned.

24 down, approximately 100 to go.

pdt256 commented 7 years ago

Forgot to associate this commit: a63a58a341b15b6c222b3486169129bf65faf3cb

Adding authorization context to 5 Tag commands. Removing TagService.

pdt256 commented 7 years ago

68 down, 65 to go. Past the halfway point!

pdt256 commented 7 years ago

100 down, 32 to go. So close.

pdt256 commented 7 years ago

All 131 actions now have an authorization context!