From 89e7a5c2c45ec6cbcbfb36d1c878eda18de75870 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Sun, 14 Jun 2020 01:06:19 +0200 Subject: [PATCH] rebase into master --- app/app.php | 3 ++- app/controllers/api/teams.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/app.php b/app/app.php index e6bebd2e5b..e01a57c137 100644 --- a/app/app.php +++ b/app/app.php @@ -28,6 +28,7 @@ $webhook = new Event('v1-webhooks', 'WebhooksV1'); $audit = new Event('v1-audits', 'AuditsV1'); $usage = new Event('v1-usage', 'UsageV1'); $mail = new Event('v1-mails', 'MailsV1'); +$deletes = new Event('v1-deletes', 'DeletesV1'); /** * Get All verified client URLs for both console and current projects @@ -226,7 +227,7 @@ $utopia->init(function () use ($utopia, $request, $response, &$user, $project, $ ; }); -$utopia->shutdown(function () use ($response, $request, $webhook, $mail, $audit, $usage, $mode, $project, $utopia) { +$utopia->shutdown(function () use ($response, $request, $webhook, $deletes, $audit, $usage, $mode, $project, $utopia) { /* * Trigger events for background workers diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index bff9629af7..0f71b0f346 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -215,7 +215,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) { + function ($teamId, $email, $name, $roles, $url) use ($response, $mail, $project, $user, $audit, $projectDB, $mode) { $name = (empty($name)) ? $email : $name; $team = $projectDB->getDocument($teamId);