-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Api][Cart] Fix for Cart access tests #11830
Conversation
Tomanhez
commented
Sep 10, 2020
Q | A |
---|---|
Branch? | 1.8 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
License | MIT |
4650cdd
to
fb8168d
Compare
src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderMethodsItemExtension.php
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderMethodsItemExtension.php
Outdated
Show resolved
Hide resolved
b89007f
to
19f0a19
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** @experimental */
should be added to all new classes.
features/cart/shopping_cart/allowing_access_only_for_correctly_logged_in_users.feature
Outdated
Show resolved
Hide resolved
features/cart/shopping_cart/clearing_cart_after_logging_out.feature
Outdated
Show resolved
Hide resolved
features/cart/shopping_cart/clearing_cart_after_logging_out.feature
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Context/CartVisitorsCustomerContext.php
Outdated
Show resolved
Hide resolved
features/cart/shopping_cart/allowing_access_only_for_correctly_logged_in_users.feature
Outdated
Show resolved
Hide resolved
features/cart/shopping_cart/clearing_cart_after_logging_out.feature
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/CommandHandler/PickupCartHandler.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderGetMethodItemExtension.php
Outdated
Show resolved
Hide resolved
19f0a19
to
c384acf
Compare
src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderGetMethodItemExtension.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/CommandHandler/PickupCartHandler.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/AddressOrderHandler.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/Doctrine/QueryItemExtension/OrderMethodsItemExtension.php
Outdated
Show resolved
Hide resolved
365f0f7
to
51eb736
Compare
src/Sylius/Bundle/ApiBundle/CommandHandler/Checkout/AddressOrderHandler.php
Outdated
Show resolved
Hide resolved
365b8df
to
0efc057
Compare
@@ -11,7 +11,7 @@ Feature: Checking out as guest with a registered email | |||
And the store allows paying offline | |||
And there is a customer account "[email protected]" | |||
|
|||
@ui @api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step is temporarily disabled and will be fixed in next iteration, We have secured the customers cart against operating by unauthorized visitor. But now user that has account in shop and try to buy something without login can't do this. Blocked by query in OrderGetMethodItemExtension.php
and OrderMethodsItemExtension.php
, As a visitor the query allow to get or to set order for situation when: customer == null
or customer.user == null
, but in this specific case should allow to continue shops when customer.user == certainUser
, Possibility solution: create context that will be store customer id after addressing step.
0efc057
to
0045578
Compare
Thanks, Tomasz! 🎉 |