Skip to content

Commit aec7813

Browse files
committed
MC-42008: Problem with customer API route
1 parent f45fe09 commit aec7813

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

app/code/Magento/Persistent/Model/Customer/Authorization.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class Authorization implements AuthorizationInterface
3535
public function __construct(
3636
CustomerSession $customerSession,
3737
PersistentSession $persistentSession
38-
) {
38+
)
39+
{
3940
$this->customerSession = $customerSession;
4041
$this->persistentSession = $persistentSession;
4142
}
@@ -48,8 +49,13 @@ public function __construct(
4849
public function isAllowed(
4950
$resource,
5051
$privilege = null
51-
) {
52-
if ($this->persistentSession->isPersistent() && !$this->customerSession->isLoggedIn()) {
52+
)
53+
{
54+
if (
55+
$this->persistentSession->isPersistent() &&
56+
$this->customerSession->getCustomerId() &&
57+
$this->customerSession->getIsCustomerEmulated()
58+
) {
5359
return false;
5460
}
5561

0 commit comments

Comments
 (0)