Skip to content

Commit

Permalink
EZP-29031: Enhance PermissionReport with parent location for cache usage
Browse files Browse the repository at this point in the history
Closes #28
  • Loading branch information
andrerom committed Apr 10, 2018
1 parent 303b71f commit 9c7a427
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/API/Repository/Values/PermissionReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

class PermissionReport extends ValueObject
{
/** @var \eZ\Publish\API\Repository\Values\Content\Location */
public $parentLocation;

/** @var int */
public $parentLocationId;

Expand Down
1 change: 1 addition & 0 deletions lib/Core/Repository/PermissionReportService.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public function canUserCreateContent(
}

return new PermissionReport([
'parentLocation' => $parentLocation,
'parentLocationId' => $parentLocation->id,
'module' => 'content',
'function' => 'create',
Expand Down

0 comments on commit 9c7a427

Please sign in to comment.