InvoiceVoter does not support other instances of Sylius\Component\User\Model\UserInterface #298
Labels
DX
Issues and PRs aimed at improving Developer eXperience.
Enhancement
Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.).
In one of my projects, we created a new
GuestUser
that implements aSylius\Component\User\Model\UserInterface
. When I tried to access an invoice with that user, theSylius\InvoicingPlugin\Security\Voter\InvoiceVoter
denied access, because it only handlesAdminUserInterface
andShopUserInterface
. TheAdminUserInterface
check seems fine, but perhaps we can consider to loosen theShopUserInterface
type check to something like a type check forSylius\Component\Customer\Model\CustomerAwareInterface
as the Customer is the only data we need in that place?What do you think?
The text was updated successfully, but these errors were encountered: