Skip to content

Commit 6867bc4

Browse files
committed
Merge pull request #508 from magento-api/for-pr
[API] Bug Fixes
2 parents 1464a2c + a7d2208 commit 6867bc4

File tree

12 files changed

+617
-126
lines changed

12 files changed

+617
-126
lines changed

app/code/Magento/Backend/App/BackendAppList.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function getCurrentApp()
4444
if ($appName && isset($this->backendApps[$appName])) {
4545
return $this->backendApps[$appName];
4646
}
47+
return null;
4748
}
4849

4950
/**

app/code/Magento/Webapi/Model/Soap/Wsdl/Generator.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Webapi\Model\Soap\WsdlFactory;
1313
use Magento\Framework\Webapi\Authorization;
1414
use Magento\Webapi\Model\ServiceMetadata;
15+
use Magento\Framework\Exception\AuthorizationException;
1516

1617
/**
1718
* WSDL generator.
@@ -364,4 +365,21 @@ protected function getServiceMetadata($serviceName)
364365
{
365366
return $this->serviceMetadata->getServiceMetadata($serviceName);
366367
}
368+
369+
/**
370+
* {@inheritdoc}
371+
*/
372+
protected function getAllowedServicesMetadata($requestedServices)
373+
{
374+
$allowedServicesMetadata = parent::getAllowedServicesMetadata($requestedServices);
375+
if (!$allowedServicesMetadata) {
376+
throw new AuthorizationException(
377+
__(
378+
AuthorizationException::NOT_AUTHORIZED,
379+
['resources' => implode(', ', $requestedServices)]
380+
)
381+
);
382+
}
383+
return $allowedServicesMetadata;
384+
}
367385
}

composer.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@
77
"OSL-3.0",
88
"AFL-3.0"
99
],
10+
"repositories": [
11+
{
12+
"type": "package",
13+
"package": {
14+
"name": "colinmollenhour/php-redis-session-abstract",
15+
"version": "1.0.100",
16+
"source": {
17+
"url": "https://github.com/colinmollenhour/php-redis-session-abstract.git",
18+
"type": "git",
19+
"reference": "95330b7f29663dab81f53d1a438e4d927b6c5f66"
20+
},
21+
"autoload": {
22+
"psr-0": {
23+
"Cm\\RedisSession\\": "src/"
24+
}
25+
}
26+
}
27+
}
28+
],
1029
"require": {
1130
"php": "~5.5.22|~5.6.0|~7.0.0",
1231
"zendframework/zend-stdlib": "~2.4.6",
@@ -33,7 +52,7 @@
3352
"zendframework/zend-http": "~2.4.6",
3453
"magento/zendframework1": "1.12.16",
3554
"colinmollenhour/credis": "1.6",
36-
"colinmollenhour/php-redis-session-abstract": "1.0",
55+
"colinmollenhour/php-redis-session-abstract": "1.0.100",
3756
"composer/composer": "1.0.0-beta1",
3857
"monolog/monolog": "1.16.0",
3958
"oyejorge/less.php": "1.7.0.3",

0 commit comments

Comments
 (0)