Skip to content

Commit f1d85cd

Browse files
committed
MC-21671: [S4] Unreliable implementation for the release publishing functionality
1 parent 69d8e65 commit f1d85cd

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

app/code/Magento/Catalog/Model/Category.php

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -923,64 +923,6 @@ public function beforeDelete()
923923
}
924924

925925
/**
926-
<<<<<<< HEAD
927-
* Get user context.
928-
*
929-
* @return UserContextInterface
930-
*/
931-
private function getUserContext(): UserContextInterface
932-
{
933-
if (!$this->userContext) {
934-
$this->userContext = ObjectManager::getInstance()->get(UserContextInterface::class);
935-
}
936-
937-
return $this->userContext;
938-
}
939-
940-
/**
941-
* Get authorization service.
942-
*
943-
* @return AuthorizationInterface
944-
*/
945-
private function getAuthorization(): AuthorizationInterface
946-
{
947-
if (!$this->authorization) {
948-
$this->authorization = ObjectManager::getInstance()->get(AuthorizationInterface::class);
949-
}
950-
951-
return $this->authorization;
952-
}
953-
954-
/**
955-
* @inheritDoc
956-
* @since 103.0.2
957-
*/
958-
public function beforeSave()
959-
{
960-
//Validate changing of design.
961-
$userType = $this->getUserContext()->getUserType();
962-
if ((
963-
$userType === UserContextInterface::USER_TYPE_ADMIN
964-
|| $userType === UserContextInterface::USER_TYPE_INTEGRATION
965-
)
966-
&& !$this->getAuthorization()->isAllowed('Magento_Catalog::edit_category_design')
967-
) {
968-
foreach ($this->_designAttributes as $attributeCode) {
969-
$this->setData($attributeCode, $value = $this->getOrigData($attributeCode));
970-
if (!empty($this->_data[self::CUSTOM_ATTRIBUTES])
971-
&& array_key_exists($attributeCode, $this->_data[self::CUSTOM_ATTRIBUTES])) {
972-
//In case custom attribute were used to update the entity.
973-
$this->_data[self::CUSTOM_ATTRIBUTES][$attributeCode]->setValue($value);
974-
}
975-
}
976-
}
977-
978-
return parent::beforeSave();
979-
}
980-
981-
/**
982-
=======
983-
>>>>>>> 2.3.4-develop
984926
* Retrieve anchors above
985927
*
986928
* @return array

0 commit comments

Comments
 (0)