From 78e6ce3e65f1289c5ab0030e46fca996281fc5b9 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 6 Sep 2023 14:26:18 +0200 Subject: [PATCH] Fix PermissionResolver::canUser examples The 4th parameter must be an array according to signature (an array of ValueObject according to phpDoc) --- src/contracts/Repository/PermissionResolver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/contracts/Repository/PermissionResolver.php b/src/contracts/Repository/PermissionResolver.php index 045aa63c6c..d4d8dd3a09 100644 --- a/src/contracts/Repository/PermissionResolver.php +++ b/src/contracts/Repository/PermissionResolver.php @@ -55,11 +55,11 @@ public function hasAccess(string $module, string $function, ?UserReference $user * Indicates if the current user is allowed to perform an action given by the function on the given * objects. * - * Example: canUser( 'content', 'edit', $content, $location ); + * Example: canUser( 'content', 'edit', $content, [$location] ); * This will check edit permission on content given the specific location, if skipped if will check on all * locations. * - * Example2: canUser( 'section', 'assign', $content, $section ); + * Example2: canUser( 'section', 'assign', $content, [$section] ); * Check if user has access to assign $content to $section. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If any of the arguments are invalid