1
0
Fork 0
mirror of synced 2024-06-29 03:30:34 +12:00

rebase into master

This commit is contained in:
Torsten Dittmann 2020-06-14 01:06:19 +02:00
parent 9ec49b90b3
commit 89e7a5c2c4
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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);