Skip to content

Commit

Permalink
2.0.0.0-dev56
Browse files Browse the repository at this point in the history
* Fixed bugs:
  * Fixed placing order with PayPal Payments Advanced and Payflow Link
  * Fixed losing previously assigned categories after saving the product with changed category selector field
  * Fixed losing of a newly created category assignment after variations generation during Configurable product or Gift Card creation
  * Fixed the error in order placement with Recurring profile payment
* GitHub requests:
  * [#299](#299) -- Fix for issue Refactor Mage_Rating_Model_Resource_Rating_Collection
  * [#341](#341) -- Replacing simple preg calls with less expensive alternates
* Modularity improvements:
  * Layout page type config moved to library
  * Design loader moved to library
  * Theme label moved to library
* Themes update:
  * Reduced amount of templates and layouts in magento_plushe theme
  * Responsive design improvements
* Integrity improvements:
  * Covered all Magento classes with argument sequence validator
  * Added arguments type duplication validator
* Implemented API Integration UX flows:
  * Ability to create and edit API Integrations
  * Ability to delete API integrations that were not created using configuration files
* Removed System REST menu item and all associated UX flows:
  * Users, Roles, and Webhook Subscriptions sub-menu items were removed
* Removed the Webhook module
  • Loading branch information
magento-team committed Dec 14, 2013
1 parent 28dcec2 commit 86db2ed
Show file tree
Hide file tree
Showing 1,024 changed files with 5,777 additions and 33,033 deletions.
36 changes: 32 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,40 @@
2.0.0.0-dev56
=============
* Fixed bugs:
* Fixed placing order with PayPal Payments Advanced and Payflow Link
* Fixed losing previously assigned categories after saving the product with changed category selector field
* Fixed losing of a newly created category assignment after variations generation during Configurable product or Gift Card creation
* Fixed the error in order placement with Recurring profile payment
* GitHub requests:
* [#299](https://github.com/magento/magento2/pull/299) -- Fix for issue Refactor Mage_Rating_Model_Resource_Rating_Collection
* [#341](https://github.com/magento/magento2/pull/341) -- Replacing simple preg calls with less expensive alternates
* Modularity improvements:
* Layout page type config moved to library
* Design loader moved to library
* Theme label moved to library
* Themes update:
* Reduced amount of templates and layouts in magento_plushe theme
* Responsive design improvements
* Integrity improvements:
* Covered all Magento classes with argument sequence validator
* Added arguments type duplication validator
* Implemented API Integration UX flows:
* Ability to create and edit API Integrations
* Ability to delete API integrations that were not created using configuration files
* Removed System REST menu item and all associated UX flows:
* Users, Roles, and Webhook Subscriptions sub-menu items were removed
* Removed the Webhook module

2.0.0.0-dev55
=============
* Modularity improvements:
* Session configuration moved to library
* FormKey logic was moved from Session
* SessionIdFlags from Session was removed
* Session configuration is moved to library
* FormKey logic is moved out from Session model
* SessionIdFlags is removed from Session model
* Move Page logic to the Theme module and library
* Created integration module UX
* Created UX for the Integration module
* Created authorization service (Magento_Authz module)
* Implemented an API Authz check in the Webapi framework
* Fixed bugs:
* Fixed the issue that prevented a customer group's shopping cart rules from applying properly to prices. The issue occurred when a customer was manually assigned to a customer group and automatic group assignment was enabled.
* Fixed the bug with schema upgrade scripts not running after installation
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Adminhtml/Block/Urlrewrite/Edit/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ protected function _prepareForm()
// Prepare form
/** @var \Magento\Data\Form $form */
$form = $this->_formFactory->create(array(
'attributes' => array(
'data' => array(
'id' => 'edit_form',
'use_container' => true,
'method' => 'post',
Expand Down
79 changes: 40 additions & 39 deletions app/code/Magento/Authorizenet/Model/Directpost.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,79 +53,80 @@ class Directpost extends \Magento\Paygate\Model\Authorizenet
*/
protected $_storeManager;

/**
* @var \Magento\Sales\Model\OrderFactory
*/
protected $_orderFactory;

/**
* @var \Magento\Sales\Model\QuoteFactory
*/
protected $_quoteFactory;

/**
* @var \Magento\Authorizenet\Model\Directpost\RequestFactory
*/
protected $_requestFactory;

/**
* @var \Magento\Authorizenet\Model\Directpost\Response
*/
protected $_response;

/**
* Construct
*
* @param \Magento\Paygate\Model\Authorizenet\CardsFactory $cardsFactory
* @param \Magento\Paygate\Model\Authorizenet\RequestFactory $parentRequestFactory
* @param \Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory
* @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param \Magento\Core\Model\Session\AbstractSession $session
* @param \Magento\Logger $logger
* @param \Magento\Event\ManagerInterface $eventManager
* @param \Magento\Paygate\Helper\Data $paygateData
* @param \Magento\Module\ModuleListInterface $moduleList
* @param \Magento\Core\Model\Store\Config $coreStoreConfig
* @param \Magento\Payment\Helper\Data $paymentData
* @param \Magento\Core\Model\Store\Config $coreStoreConfig
* @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
* @param \Magento\Logger $logger
* @param \Magento\Module\ModuleListInterface $moduleList
* @param \Magento\Core\Model\LocaleInterface $locale
* @param \Magento\Centinel\Model\Service $centinelService
* @param \Magento\Core\Model\StoreManagerInterface $storeManager
* @param \Magento\Paygate\Model\Authorizenet\CardsFactory $cardsFactory
* @param \Magento\Paygate\Model\Authorizenet\RequestFactory $requestFactory
* @param \Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory
* @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param \Magento\Core\Model\Session\AbstractSession $session
* @param \Magento\Paygate\Helper\Data $paygateData
* @param \Magento\Core\Model\StoreManagerInterface $storeManager
* @param \Magento\Sales\Model\QuoteFactory $quoteFactory
* @param \Magento\Authorizenet\Model\Directpost\RequestFactory $requestFactory
* @param \Magento\Authorizenet\Model\Directpost\RequestFactory $directRequestFactory
* @param \Magento\Authorizenet\Model\Directpost\Response $response
* @param array $data
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
\Magento\Paygate\Model\Authorizenet\CardsFactory $cardsFactory,
\Magento\Paygate\Model\Authorizenet\RequestFactory $parentRequestFactory,
\Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory,
\Magento\Sales\Model\OrderFactory $orderFactory,
\Magento\Core\Model\Session\AbstractSession $session,
\Magento\Logger $logger,
\Magento\Event\ManagerInterface $eventManager,
\Magento\Paygate\Helper\Data $paygateData,
\Magento\Module\ModuleListInterface $moduleList,
\Magento\Core\Model\Store\Config $coreStoreConfig,
\Magento\Payment\Helper\Data $paymentData,
\Magento\Core\Model\Store\Config $coreStoreConfig,
\Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
\Magento\Logger $logger,
\Magento\Module\ModuleListInterface $moduleList,
\Magento\Core\Model\LocaleInterface $locale,
\Magento\Centinel\Model\Service $centinelService,
\Magento\Core\Model\StoreManagerInterface $storeManager,
\Magento\Paygate\Model\Authorizenet\CardsFactory $cardsFactory,
\Magento\Paygate\Model\Authorizenet\RequestFactory $requestFactory,
\Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory,
\Magento\Sales\Model\OrderFactory $orderFactory,
\Magento\Core\Model\Session\AbstractSession $session,
\Magento\Paygate\Helper\Data $paygateData,
\Magento\Core\Model\StoreManagerInterface $storeManager,
\Magento\Sales\Model\QuoteFactory $quoteFactory,
\Magento\Authorizenet\Model\Directpost\RequestFactory $requestFactory,
\Magento\Authorizenet\Model\Directpost\RequestFactory $directRequestFactory,
\Magento\Authorizenet\Model\Directpost\Response $response,
array $data = array()
) {
parent::__construct($cardsFactory, $parentRequestFactory, $resultFactory, $orderFactory, $session,
$logger, $eventManager, $paygateData, $moduleList, $coreStoreConfig, $paymentData,
$logAdapterFactory, $locale, $centinelService, $data);
parent::__construct(
$eventManager,
$paymentData,
$coreStoreConfig,
$logAdapterFactory,
$logger,
$moduleList,
$locale,
$centinelService,
$cardsFactory,
$requestFactory,
$resultFactory,
$orderFactory,
$session,
$paygateData,
$data
);
$this->_storeManager = $storeManager;
$this->_orderFactory = $orderFactory;
$this->_quoteFactory = $quoteFactory;
$this->_requestFactory = $requestFactory;
$this->_requestFactory = $directRequestFactory;
$this->_response = $response;
}

Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Authorizenet/Model/Directpost/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ class Session extends \Magento\Core\Model\Session\AbstractSession
* @param \Magento\Core\Model\Session\Context $context
* @param \Magento\Session\SidResolverInterface $sidResolver
* @param \Magento\Session\Config\ConfigInterface $sessionConfig
* @param null $sessionName
* @param array $data
* @param string|null $sessionName
*/
public function __construct(
\Magento\Core\Model\Session\Context $context,
\Magento\Session\SidResolverInterface $sidResolver,
\Magento\Session\Config\ConfigInterface $sessionConfig,
array $data = array(),
$sessionName = null
$sessionName = null,
array $data = array()
) {
parent::__construct($context, $sidResolver, $sessionConfig, $data);
$this->start('authorizenet_directpost', $sessionName);
Expand Down
39 changes: 39 additions & 0 deletions app/code/Magento/Authz/Service/AuthorizationV1.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,23 @@ public function getAllowedResources(UserIdentifier $userIdentifier)
return $allowedResources;
}

/**
* {@inheritdoc}
*/
public function removePermissions(UserIdentifier $userIdentifier)
{
try {
$this->_deleteRole($userIdentifier);
} catch (ServiceException $e) {
throw $e;
} catch (\Exception $e) {
$this->_logger->logException($e);
throw new ServiceException(
__('Error happened while deleting role and permissions. Check exception log for details.')
);
}
}

/**
* Create new ACL role.
*
Expand Down Expand Up @@ -223,6 +240,28 @@ protected function _createRole($userIdentifier)
return $role;
}

/**
* Remove an ACL role. This deletes the cascading permissions
*
* @param UserIdentifier $userIdentifier
* @return Role
* @throws \LogicException
*/
protected function _deleteRole($userIdentifier)
{
$userType = $userIdentifier->getUserType();
$userId = $userIdentifier->getUserId();
switch ($userType) {
case UserIdentifier::USER_TYPE_INTEGRATION:
$roleName = $userType . $userId;
break;
default:
throw new \LogicException("Unknown user type: '{$userType}'.");
}
$role = $this->_roleFactory->create()->load($roleName, 'role_name');
return $role->delete();
}

/**
* Identify user role from user identifier.
*
Expand Down
8 changes: 8 additions & 0 deletions app/code/Magento/Authz/Service/AuthorizationV1Interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,12 @@ public function isAllowed($resources, UserIdentifier $userIdentifier = null);
* @throws ServiceException
*/
public function getAllowedResources(UserIdentifier $userIdentifier);

/**
* Remove user role and associated permissions.
*
* @param UserIdentifier $userIdentifier
* @throws ServiceException
*/
public function removePermissions(UserIdentifier $userIdentifier);
}
16 changes: 4 additions & 12 deletions app/code/Magento/Backend/App/Action/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ class Context extends \Magento\App\Action\Context
* @param \Magento\App\ResponseInterface $response
* @param \Magento\ObjectManager $objectManager
* @param \Magento\Event\ManagerInterface $eventManager
* @param \Magento\Backend\Model\Session $session
* @param \Magento\UrlInterface $url
* @param \Magento\App\Response\RedirectInterface $redirect
* @param \Magento\App\ActionFlag $actionFlag
* @param \Magento\App\ViewInterface $view
* @param \Magento\Backend\Model\Session $session
* @param \Magento\AuthorizationInterface $authorization
* @param \Magento\Backend\Model\Auth $auth
* @param \Magento\Backend\Helper\Data $helper
Expand All @@ -100,11 +100,11 @@ public function __construct(
\Magento\App\ResponseInterface $response,
\Magento\ObjectManager $objectManager,
\Magento\Event\ManagerInterface $eventManager,
\Magento\Backend\Model\Session $session,
\Magento\UrlInterface $url,
\Magento\App\Response\RedirectInterface $redirect,
\Magento\App\ActionFlag $actionFlag,
\Magento\App\ViewInterface $view,
\Magento\Backend\Model\Session $session,
\Magento\AuthorizationInterface $authorization,
\Magento\Backend\Model\Auth $auth,
\Magento\Backend\Helper\Data $helper,
Expand All @@ -114,16 +114,8 @@ public function __construct(
\Magento\Core\Model\LocaleInterface $locale,
$canUseBaseUrl = false
) {
parent::__construct(
$request,
$response,
$objectManager,
$eventManager,
$url,
$redirect,
$actionFlag,
$view
);
parent::__construct($request, $response, $objectManager, $eventManager, $url, $redirect, $actionFlag, $view);

$this->_session = $session;
$this->_authorization = $authorization;
$this->_auth = $auth;
Expand Down
25 changes: 17 additions & 8 deletions app/code/Magento/Backend/App/Router/DefaultRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,22 @@ class DefaultRouter extends \Magento\Core\App\Router\Base
protected $_coreConfig;

/**
* @param \Magento\Core\Model\Config $coreConfig
* @param \Magento\App\ActionFactory $actionFactory
* @param \Magento\App\DefaultPathInterface $defaultPath
* @param \Magento\App\ResponseFactory $responseFactory
* @param \Magento\App\Route\ConfigInterface $routeConfig
* @param \Magento\App\State $appState
* @param \Magento\Core\Model\Url|\Magento\UrlInterface $url
* @param \Magento\Core\Model\StoreManager|\Magento\Core\Model\StoreManagerInterface $storeManager
* @param \Magento\UrlInterface $url
* @param \Magento\Core\Model\StoreManagerInterface $storeManager
* @param \Magento\Core\Model\Store\Config $storeConfig
* @param \Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo
* @param $routerId
* @param string $routerId
* @param \Magento\Core\Model\Config $coreConfig
* @param \Magento\Backend\App\ConfigInterface $backendConfig
* @throws \InvalidArgumentException
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
\Magento\Core\Model\Config $coreConfig,
\Magento\App\ActionFactory $actionFactory,
\Magento\App\DefaultPathInterface $defaultPath,
\Magento\App\ResponseFactory $responseFactory,
Expand All @@ -70,11 +70,20 @@ public function __construct(
\Magento\Core\Model\Store\Config $storeConfig,
\Magento\Core\Model\Url\SecurityInfoInterface $urlSecurityInfo,
$routerId,
\Magento\Core\Model\Config $coreConfig,
\Magento\Backend\App\ConfigInterface $backendConfig
) {
parent::__construct(
$actionFactory, $defaultPath, $responseFactory, $routeConfig, $appState, $url, $storeManager, $storeConfig,
$urlSecurityInfo, $routerId
$actionFactory,
$defaultPath,
$responseFactory,
$routeConfig,
$appState,
$url,
$storeManager,
$storeConfig,
$urlSecurityInfo,
$routerId
);
$this->_coreConfig = $coreConfig;
$this->_backendConfig = $backendConfig;
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Backend/Block/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ class Context extends \Magento\View\Element\Context
* @param \Magento\View\Url $viewUrl
* @param \Magento\View\ConfigInterface $viewConfig
* @param \Magento\App\Cache\StateInterface $cacheState
* @param \Magento\AuthorizationInterface $authorization
* @param \Magento\Logger $logger
* @param \Magento\Core\Model\App $app
* @param \Magento\Escaper $escaper
* @param \Magento\Filter\FilterManager $filterManager
* @param \Magento\Core\Model\LocaleInterface $locale
* @param \Magento\AuthorizationInterface $authorization
* @param array $data
*
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
Expand All @@ -77,12 +77,12 @@ public function __construct(
\Magento\View\Url $viewUrl,
\Magento\View\ConfigInterface $viewConfig,
\Magento\App\Cache\StateInterface $cacheState,
\Magento\AuthorizationInterface $authorization,
\Magento\Logger $logger,
\Magento\Core\Model\App $app,
\Magento\Escaper $escaper,
\Magento\Filter\FilterManager $filterManager,
\Magento\Core\Model\LocaleInterface $locale,
\Magento\AuthorizationInterface $authorization,
array $data = array()
) {
$this->_authorization = $authorization;
Expand Down
Loading

0 comments on commit 86db2ed

Please sign in to comment.