From 5c794dd22bd2fd5f08a4d33f9880adbe557b3013 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Thu, 9 Jul 2020 13:44:35 +0300 Subject: [PATCH] Fix for server mode --- app/controllers/api/teams.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 4128fad7b9..90301656ae 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -219,7 +219,7 @@ $utopia->post('/v1/teams/:teamId/memberships') ->param('roles', [], function () { return new ArrayList(new Text(128)); }, 'Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions).') ->param('url', '', function () use ($clients) { return new Host($clients); }, 'URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.') // TODO add our own built-in confirm page ->action( - function ($teamId, $email, $name, $roles, $url) use ($response, $mail, $project, $user, $audit, $projectDB, $mode) { + function ($teamId, $email, $name, $roles, $url) use ($response, $mail, $project, $user, $audit, $projectDB, &$mode) { $name = (empty($name)) ? $email : $name; $team = $projectDB->getDocument($teamId);