-
-
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] Extract user logic rules for orders to separate extension #13984
Conversation
lchrusciel
commented
May 13, 2022
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Related tickets | Continues #13962 |
License | MIT |
f9c962a
to
d57c018
Compare
d57c018
to
e83f422
Compare
e83f422
to
cd256c7
Compare
$rootAlias = $queryBuilder->getRootAliases()[0]; | ||
$user = $this->userContext->getUser(); | ||
|
||
if (!$user instanceof ShopUserInterface) { | ||
return; | ||
} |
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.
$rootAlias = $queryBuilder->getRootAliases()[0]; | |
$user = $this->userContext->getUser(); | |
if (!$user instanceof ShopUserInterface) { | |
return; | |
} | |
$user = $this->userContext->getUser(); | |
if (!$user instanceof ShopUserInterface) { | |
return; | |
} | |
$rootAlias = $queryBuilder->getRootAliases()[0]; |
$rootAlias = $queryBuilder->getRootAliases()[0]; | ||
|
||
$user = $this->userContext->getUser(); | ||
|
||
if ($user !== null) { | ||
return; | ||
} |
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.
$rootAlias = $queryBuilder->getRootAliases()[0]; | |
$user = $this->userContext->getUser(); | |
if ($user !== null) { | |
return; | |
} | |
$user = $this->userContext->getUser(); | |
if ($user !== null) { | |
return; | |
} | |
$rootAlias = $queryBuilder->getRootAliases()[0]; |
); | ||
} | ||
|
||
function it_does_nothing_if_object_passed_is_different_then_order( |
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.
function it_does_nothing_if_object_passed_is_different_then_order( | |
function it_does_nothing_if_object_passed_is_different_than_order( |
$this->beConstructedWith($userContext); | ||
} | ||
|
||
function it_filters_carts_for_visitors_to_not_authorized_for_methods_other_then_get( |
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.
function it_filters_carts_for_visitors_to_not_authorized_for_methods_other_then_get( | |
function it_filters_carts_for_visitors_to_not_authorized_for_methods_other_than_get( |
$this->beConstructedWith($userContext); | ||
} | ||
|
||
function it_filters_carts_for_shop_users_to_the_one_owned_by_them_for_methods_other_then_get( |
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.
function it_filters_carts_for_shop_users_to_the_one_owned_by_them_for_methods_other_then_get( | |
function it_filters_carts_for_shop_users_to_the_one_owned_by_them_for_methods_other_than_get( |
); | ||
} | ||
|
||
function it_does_nothing_if_object_passed_is_different_then_order( |
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.
function it_does_nothing_if_object_passed_is_different_then_order( | |
function it_does_nothing_if_object_passed_is_different_than_order( |
Thank you, Łukasz! 🎉 |
…ciel, jakubtobiasz) This PR was merged into the 1.12 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | master | | Bug fix? | no | | New feature? | no | | BC breaks? | no | | Deprecations? | no | | Related tickets | #13984 (review) | | License | MIT | <!-- - Bug fixes must be submitted against the 1.10 or 1.11 branch(the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- 25fd428 [Minor] Typo fixes and small code improvement ed00a4e Fix wrongly placed changes
…ciel, jakubtobiasz) This PR was merged into the 1.12 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | master | | Bug fix? | no | | New feature? | no | | BC breaks? | no | | Deprecations? | no | | Related tickets | Sylius/Sylius#13984 (review) | | License | MIT | <!-- - Bug fixes must be submitted against the 1.10 or 1.11 branch(the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- 25fd428c3f1d7689617148c7eed7cd69583b53d7 [Minor] Typo fixes and small code improvement ed00a4e474c271c4399b66aaab974ed3541ad7c5 Fix wrongly placed changes