From df0b4b62f1c88bfc64f79d15edc97b7dcf1a4de3 Mon Sep 17 00:00:00 2001 From: Hemachandar Date: Fri, 27 Feb 2026 12:58:53 +0530 Subject: [PATCH] Per-project permissions for installations --- .../Platform/Modules/VCS/Http/GitHub/Callback/Get.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Callback/Get.php b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Callback/Get.php index 1212c06a72..4ab2613556 100644 --- a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Callback/Get.php +++ b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Callback/Get.php @@ -4,6 +4,7 @@ namespace Appwrite\Platform\Modules\VCS\Http\GitHub\Callback; use Appwrite\Auth\OAuth2\Github as OAuth2Github; use Appwrite\Extend\Exception; +use Appwrite\Platform\Permission as AppwritePermission; use Appwrite\Utopia\Response; use Utopia\Database\Database; use Utopia\Database\DateTime; @@ -21,6 +22,7 @@ use Utopia\VCS\Adapter\Git\GitHub; class Get extends Action { use HTTP; + use AppwritePermission; public static function getName() { @@ -132,13 +134,7 @@ class Get extends Action $installation = new Document([ '$id' => ID::unique(), - '$permissions' => [ - Permission::read(Role::team(ID::custom($teamId))), - Permission::update(Role::team(ID::custom($teamId), 'owner')), - Permission::update(Role::team(ID::custom($teamId), 'developer')), - Permission::delete(Role::team(ID::custom($teamId), 'owner')), - Permission::delete(Role::team(ID::custom($teamId), 'developer')), - ], + '$permissions' => $this->getPermissions($teamId, $projectId), 'providerInstallationId' => $providerInstallationId, 'projectId' => $projectId, 'projectInternalId' => $projectInternalId,