Skip to content

Commit

Permalink
Merge pull request #5 from theodo/upgrade/support-api-platform2.5
Browse files Browse the repository at this point in the history
Upgrade/support api platform2.5
  • Loading branch information
Paulmolin authored Jun 19, 2020
2 parents 2e62a4a + 41e04a9 commit d501be5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"symfony/dependency-injection": "^4.0|^5.0",
"symfony/http-kernel": "^4.0|^5.0",
"symfony/routing": "^4.0|^5.0",
"api-platform/core": ">=2.1.0 <2.5.0"
"api-platform/core": "^2.5"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/AccessControl/RouteAccessControlFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function getAccessControlExpressionForApiPlatform(Route $route): strin
try {
$resourceMetadata = $this->resourceMetadataFactory->create($resourceClass);
$attributes = AttributesExtractor::extractAttributes($route->getDefaults());
$isGranted = $resourceMetadata->getOperationAttribute($attributes, 'access_control', null, true);
$isGranted = $resourceMetadata->getOperationAttribute($attributes, 'security', null, true);
if (null === $isGranted) {
$isGranted = RouteAccessControlData::NO_ACCESS_CONTROL;
}
Expand Down

0 comments on commit d501be5

Please sign in to comment.