Commit 8c2aa636 authored by mglaman's avatar mglaman Committed by bojanz

Issue #2826485 by mglaman: Product::getDefaultVariation does not check if user...

Issue #2826485 by mglaman: Product::getDefaultVariation does not check if user has access to variation (#599)
parent 74c655e8
......@@ -264,7 +264,7 @@ class Product extends ContentEntityBase implements ProductInterface {
public function getDefaultVariation() {
foreach ($this->getVariations() as $variation) {
// Return the first active variation.
if ($variation->isActive()) {
if ($variation->isActive() && $variation->access('view')) {
return $variation;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment