From d29ec96b7fb027cc04444e0b750da5201ab5f828 Mon Sep 17 00:00:00 2001 From: Mohammad Alavi Date: Wed, 15 Dec 2021 19:26:36 +0330 Subject: [PATCH] remove unneccesarry access --- .../AppSection/User/UI/API/Requests/FindUserByIdRequest.php | 5 +---- .../User/UI/API/Routes/FindUserById.v1.private.php | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/Containers/AppSection/User/UI/API/Requests/FindUserByIdRequest.php b/app/Containers/AppSection/User/UI/API/Requests/FindUserByIdRequest.php index b3387b557..7d31ea01f 100644 --- a/app/Containers/AppSection/User/UI/API/Requests/FindUserByIdRequest.php +++ b/app/Containers/AppSection/User/UI/API/Requests/FindUserByIdRequest.php @@ -3,12 +3,9 @@ namespace App\Containers\AppSection\User\UI\API\Requests; use App\Ship\Parents\Requests\Request; -use App\Containers\AppSection\Authorization\Traits\IsResourceOwnerTrait; class FindUserByIdRequest extends Request { - use IsResourceOwnerTrait; - /** * Define which Roles and/or Permissions has access to this request. */ @@ -42,7 +39,7 @@ public function rules(): array public function authorize(): bool { return $this->check([ - 'hasAccess|isResourceOwner', + 'hasAccess', ]); } } diff --git a/app/Containers/AppSection/User/UI/API/Routes/FindUserById.v1.private.php b/app/Containers/AppSection/User/UI/API/Routes/FindUserById.v1.private.php index 10070f033..62b1c3247 100644 --- a/app/Containers/AppSection/User/UI/API/Routes/FindUserById.v1.private.php +++ b/app/Containers/AppSection/User/UI/API/Routes/FindUserById.v1.private.php @@ -7,7 +7,7 @@ * @apiDescription Find a user by its ID * * @apiVersion 1.0.0 - * @apiPermission Authenticated ['permissions' => 'delete-users', 'roles' => ''] | Resource Owner + * @apiPermission Authenticated ['permissions' => 'search-users', 'roles' => ''] * * @apiUse UserSuccessSingleResponse */