From 4d8f95095568662ea3b454976f01a44fa2d0c8a3 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 16 Oct 2025 02:17:52 +0000 Subject: [PATCH] fix roles filtering --- app/controllers/api/teams.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 1c96aa0116..387fb7d48b 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -474,9 +474,8 @@ App::post('/v1/teams/:teamId/memberships') ->param('phone', '', new Phone(), 'Phone number. Format this number with a leading \'+\' and a country code, e.g., +16175551212.', true) ->param('roles', [], function (Document $project) { if ($project->getId() === 'console') { - ; $roles = array_keys(Config::getParam('roles', [])); - array_filter($roles, function ($role) { + $roles = array_filter($roles, function ($role) { return !in_array($role, [USER_ROLE_APPS, USER_ROLE_GUESTS, USER_ROLE_USERS]); }); return new ArrayList(new WhiteList($roles), APP_LIMIT_ARRAY_PARAMS_SIZE);