From 5424531b85e0c609c87a99caa085eab35de91fb9 Mon Sep 17 00:00:00 2001 From: Sayanta Banerjee <53281158+Sayanta66@users.noreply.github.com> Date: Wed, 22 Sep 2021 16:25:09 +0530 Subject: [PATCH 01/53] Copyedited the tutorial Copyedited the tutorial. Fixed all of the document errors and punctuation errors along with typos --- docs/tutorials/add-environment-variable.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/tutorials/add-environment-variable.md b/docs/tutorials/add-environment-variable.md index c88eb585dc..c9ed2ee3ad 100644 --- a/docs/tutorials/add-environment-variable.md +++ b/docs/tutorials/add-environment-variable.md @@ -1,32 +1,32 @@ # Introducing new Environment Variable -This document is part of the Appwrite contributors' guide. Before you continue reading this document make sure you have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/master/CODE_OF_CONDUCT.md) and the [Contributing Guide](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md). +This document is part of the Appwrite contributors' guide. Before you continue reading this document, make sure you have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/master/CODE_OF_CONDUCT.md) and the [Contributing Guide](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md). ## Getting Started ### Agenda -Adding new features may require various configurations options to be set by the users. And for such options we use environment variables in Appwrite. +Adding new features may require various configurations options to be set by the users. And for such options, we use environment variables in Appwrite. -This tutorial will cover, how to properly add a new environment variable in Appwrite. +This tutorial will cover how to properly add a new environment variable in Appwrite. ### Naming environment varialbe -The environment variables in Appwrite are prefixed with `_APP_`. If it belongs to a specific category, the category name is appended as `_APP_REDIS` for the redis category. The available categories are General, Redis, MariaDB, InfluxDB, StatsD, SMTP, Storage and Functions. Finally a properly describing name is given to the variable. For example `_APP_REDIS_HOST` is an environment variable for redis connection host. You can find more information on available categories and existing environment variables in the [environment variables doc](https://appwrite.io/docs/environment-variables). +The environment variables in Appwrite are prefixed with `_APP_`. If it belongs to a specific category, the category name is appended as `_APP_REDIS` for the Redis category. The available categories are General, Redis, MariaDB, InfluxDB, StatsD, SMTP, Storage and Functions. Finally, a properly describing name is given to the variable. For example, `_APP_REDIS_HOST` is an environment variable for Redis connection host. You can find more information on available categories and existing environment variables in the [environment variables doc](https://appwrite.io/docs/environment-variables). ### Describe new environment variable -First of all, we add the new environment variable to `app/config/variables.php` in the designated category. If none of the categories fit, add it to the General category. Copy the existing variables description to create a new one, so that you will not miss any required fields. +First of all, we added the new environment variable to `app/config/variables.php` in the designated category. If none of the categories fit, add it to the General category. Copy the description of the existing variable to create a new one so that you will not miss any required fields. This information is also used to generate the website documentation at https://appwrite.io/docs/environment-variables, so please use good descriptions that clearly define the purpose and other required info about the environment variable that you are adding. ### Add to .env and Dockerfile -If newly introduced environment variable has a default value, add it to the `.env` and `Dockerfile` along with other environment variables. `.env` file uses settings for Appwrite development environment. +If the newly introduced environment variable has a default value, add it to the `.env` and `Dockerfile` along with other environment variables. `.env` file uses settings for Appwrite development environment. -### Add to docker compose file and template -Add the new environment variables to the `docker-compose.yml` and `app/views/install/compose.phtml` for each docker services that require access to those environment variables. +### Add to docker-compose file and template +Add the new environment variables to the `docker-compose.yml` and `app/views/install/compose.phtml` for each docker service that requires access to those environment variables. -The `docker-compose.yml` file is used by the Appwrite maintainers during development where as `app/views/install/compose.phtml` file is used by the Appwrite setup script. +The Appwrite maintainers use the `docker-compose.yml` file during development, whereas the `app/views/install/compose.phtml` file is used by the Appwrite setup script. With these steps, your environment variable is properly added and can be accessed inside Appwrite code and any other containers where it is passed. You can access and use those variables to implement the features you are trying to achieve. If everything went well, commit and initiate a PR and wait for the Appwrite team's approval. -Whooho! you have successfully added new environment variable to Appwrite. 🎉 +Whooho! You have successfully added the new environment variable to Appwrite. 🎉 From 77d0010c9aa9ef7e3f6b65e34b8c7fc0fb41ad6d Mon Sep 17 00:00:00 2001 From: Sayanta Banerjee <53281158+Sayanta66@users.noreply.github.com> Date: Mon, 27 Sep 2021 20:14:27 +0530 Subject: [PATCH 02/53] Update add-environment-variable.md --- docs/tutorials/add-environment-variable.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/add-environment-variable.md b/docs/tutorials/add-environment-variable.md index c9ed2ee3ad..3bfbdc9c60 100644 --- a/docs/tutorials/add-environment-variable.md +++ b/docs/tutorials/add-environment-variable.md @@ -29,4 +29,4 @@ With these steps, your environment variable is properly added and can be accesse If everything went well, commit and initiate a PR and wait for the Appwrite team's approval. -Whooho! You have successfully added the new environment variable to Appwrite. 🎉 +Whooho! You have successfully added a new environment variable to Appwrite. 🎉 From 4542b7572a738139fc4c8bd7c43ccc5e83ac6da6 Mon Sep 17 00:00:00 2001 From: Sayanta Banerjee <53281158+Sayanta66@users.noreply.github.com> Date: Mon, 27 Sep 2021 20:16:19 +0530 Subject: [PATCH 03/53] Update add-environment-variable.md --- docs/tutorials/add-environment-variable.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/add-environment-variable.md b/docs/tutorials/add-environment-variable.md index 3bfbdc9c60..8e0e5e29cc 100644 --- a/docs/tutorials/add-environment-variable.md +++ b/docs/tutorials/add-environment-variable.md @@ -23,7 +23,7 @@ If the newly introduced environment variable has a default value, add it to the ### Add to docker-compose file and template Add the new environment variables to the `docker-compose.yml` and `app/views/install/compose.phtml` for each docker service that requires access to those environment variables. -The Appwrite maintainers use the `docker-compose.yml` file during development, whereas the `app/views/install/compose.phtml` file is used by the Appwrite setup script. +The docker-compose.yml file is used by the Appwrite maintainers during development, whereas the `app/views/install/compose.phtml` file is used by the Appwrite setup script. With these steps, your environment variable is properly added and can be accessed inside Appwrite code and any other containers where it is passed. You can access and use those variables to implement the features you are trying to achieve. From 3d6c8e3d9a0708dbd84a16133d3313f00cf4757f Mon Sep 17 00:00:00 2001 From: Sayanta Banerjee <53281158+Sayanta66@users.noreply.github.com> Date: Mon, 27 Sep 2021 20:21:19 +0530 Subject: [PATCH 04/53] Update add-environment-variable.md --- docs/tutorials/add-environment-variable.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorials/add-environment-variable.md b/docs/tutorials/add-environment-variable.md index 8e0e5e29cc..917e90bb31 100644 --- a/docs/tutorials/add-environment-variable.md +++ b/docs/tutorials/add-environment-variable.md @@ -13,17 +13,17 @@ This tutorial will cover how to properly add a new environment variable in Appwr The environment variables in Appwrite are prefixed with `_APP_`. If it belongs to a specific category, the category name is appended as `_APP_REDIS` for the Redis category. The available categories are General, Redis, MariaDB, InfluxDB, StatsD, SMTP, Storage and Functions. Finally, a properly describing name is given to the variable. For example, `_APP_REDIS_HOST` is an environment variable for Redis connection host. You can find more information on available categories and existing environment variables in the [environment variables doc](https://appwrite.io/docs/environment-variables). ### Describe new environment variable -First of all, we added the new environment variable to `app/config/variables.php` in the designated category. If none of the categories fit, add it to the General category. Copy the description of the existing variable to create a new one so that you will not miss any required fields. +First of all, we added the new environment variable to `app/config/variables.php` in the designated category. If none of the categories fit, add it to the General category. Copy the existing variable description to create a new one so that you will not miss any required fields. This information is also used to generate the website documentation at https://appwrite.io/docs/environment-variables, so please use good descriptions that clearly define the purpose and other required info about the environment variable that you are adding. ### Add to .env and Dockerfile If the newly introduced environment variable has a default value, add it to the `.env` and `Dockerfile` along with other environment variables. `.env` file uses settings for Appwrite development environment. -### Add to docker-compose file and template +### Add to Docker Compose file and template Add the new environment variables to the `docker-compose.yml` and `app/views/install/compose.phtml` for each docker service that requires access to those environment variables. -The docker-compose.yml file is used by the Appwrite maintainers during development, whereas the `app/views/install/compose.phtml` file is used by the Appwrite setup script. +The `docker-compose.yml` file is used by the Appwrite maintainers during development, whereas the `app/views/install/compose.phtml` file is used by the Appwrite setup script. With these steps, your environment variable is properly added and can be accessed inside Appwrite code and any other containers where it is passed. You can access and use those variables to implement the features you are trying to achieve. From 6b77fcf21f775c28ab328b43650300c3cfeccc9a Mon Sep 17 00:00:00 2001 From: Matej Baco Date: Wed, 12 Jan 2022 20:51:13 +0100 Subject: [PATCH 05/53] FIxed 409 for createCollection --- app/controllers/api/database.php | 4 ++-- .../Database/DatabaseCustomServerTest.php | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index c6fb149700..00e951030f 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/database.php @@ -166,8 +166,6 @@ App::post('/v1/database/collections') $collectionId = $collectionId == 'unique()' ? $dbForProject->getId() : $collectionId; try { - $dbForProject->createCollection('collection_' . $collectionId); - $collection = $dbForProject->createDocument('collections', new Document([ '$id' => $collectionId, '$read' => $read ?? [], // Collection permissions for collection documents (based on permission model) @@ -183,6 +181,8 @@ App::post('/v1/database/collections') throw new Exception('Collection already exists', 409); } + $dbForProject->createCollection('collection_' . $collectionId); + $audits ->setParam('event', 'database.collections.create') ->setParam('resource', 'collection/'.$collectionId) diff --git a/tests/e2e/Services/Database/DatabaseCustomServerTest.php b/tests/e2e/Services/Database/DatabaseCustomServerTest.php index 659839debe..cd14974c6c 100644 --- a/tests/e2e/Services/Database/DatabaseCustomServerTest.php +++ b/tests/e2e/Services/Database/DatabaseCustomServerTest.php @@ -7,6 +7,7 @@ use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; use Tests\E2E\Client; use Utopia\Database\Database; +use function array_merge; class DatabaseCustomServerTest extends Scope { @@ -136,6 +137,21 @@ class DatabaseCustomServerTest extends Scope ]); $this->assertEquals($response['headers']['status-code'], 400); + + // This collection already exists + $response = $this->client->call(Client::METHOD_POST, '/database/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'name' => 'Test 1', + 'collectionId' => 'first', + 'read' => ['role:all'], + 'write' => ['role:all'], + 'permission' => 'document' + ]); + + $this->assertEquals($response['headers']['status-code'], 409); } public function testDeleteAttribute(): array From 2f75f9d13de1f056d28996c4921f1dc5e8d7c9fd Mon Sep 17 00:00:00 2001 From: Matej Baco Date: Wed, 12 Jan 2022 20:54:19 +0100 Subject: [PATCH 06/53] Removed leftover --- tests/e2e/Services/Database/DatabaseCustomServerTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/e2e/Services/Database/DatabaseCustomServerTest.php b/tests/e2e/Services/Database/DatabaseCustomServerTest.php index cd14974c6c..117ca960d4 100644 --- a/tests/e2e/Services/Database/DatabaseCustomServerTest.php +++ b/tests/e2e/Services/Database/DatabaseCustomServerTest.php @@ -7,7 +7,6 @@ use Tests\E2E\Scopes\Scope; use Tests\E2E\Scopes\SideServer; use Tests\E2E\Client; use Utopia\Database\Database; -use function array_merge; class DatabaseCustomServerTest extends Scope { From a102ee6f148612fca4e6f59618d27b6d08efd1d1 Mon Sep 17 00:00:00 2001 From: Vincent Ge Date: Wed, 12 Jan 2022 17:05:25 -0500 Subject: [PATCH 07/53] Wrap unique() in double quotes to better indicate that it's a literal string --- app/controllers/api/account.php | 4 ++-- app/controllers/api/database.php | 4 ++-- app/controllers/api/functions.php | 2 +- app/controllers/api/projects.php | 2 +- app/controllers/api/storage.php | 2 +- app/controllers/api/teams.php | 2 +- app/controllers/api/users.php | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 5316ba6ef1..75f11830f6 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -44,7 +44,7 @@ App::post('/v1/account') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_USER) ->label('abuse-limit', 10) - ->param('userId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('userId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('email', '', new Email(), 'User email.') ->param('password', '', new Password(), 'User password. Must be at least 8 chars.') ->param('name', '', new Text(128), 'User name. Max length: 128 chars.', true) @@ -615,7 +615,7 @@ App::post('/v1/account/sessions/magic-url') ->label('sdk.response.model', Response::MODEL_TOKEN) ->label('abuse-limit', 10) ->label('abuse-key', 'url:{url},email:{param-email}') - ->param('userId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('userId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('email', '', new Email(), 'User email.') ->param('url', '', function ($clients) { return new Host($clients); }, 'URL to redirect the user back to your app from the magic URL login. 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.', true, ['clients']) ->inject('request') diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index c6fb149700..864675fb98 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/database.php @@ -148,7 +148,7 @@ App::post('/v1/database/collections') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_COLLECTION) - ->param('collectionId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('collectionId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Collection name. Max length: 128 chars.') ->param('permission', null, new WhiteList(['document', 'collection']), 'Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.') ->param('read', null, new Permissions(), 'An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.') @@ -1563,7 +1563,7 @@ App::post('/v1/database/collections/:collectionId/documents') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_DOCUMENT) - ->param('documentId', '', new CustomId(), 'Document ID. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('documentId', '', new CustomId(), 'Document ID. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('collectionId', null, new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). Make sure to define attributes before creating documents.') ->param('data', [], new JSON(), 'Document data as JSON object.') ->param('read', null, new Permissions(), 'An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.', true) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index eab8f322a4..f56a9e3a8c 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -39,7 +39,7 @@ App::post('/v1/functions') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_FUNCTION) - ->param('functionId', '', new CustomId(), 'Function ID. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('functionId', '', new CustomId(), 'Function ID. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', '', new Text(128), 'Function name. Max length: 128 chars.') ->param('execute', [], new ArrayList(new Text(64)), 'An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.') ->param('runtime', '', new WhiteList(array_keys(Config::getParam('runtimes')), true), 'Execution runtime.') diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 9c4f9bc9bf..4b706be2dc 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -43,7 +43,7 @@ App::post('/v1/projects') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_PROJECT) - ->param('projectId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('projectId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', null, new Text(128), 'Project name. Max length: 128 chars.') ->param('teamId', '', new UID(), 'Team unique ID.') ->param('description', '', new Text(256), 'Project description. Max length: 256 chars.', true) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 4a5fb7cfe1..1dba0c722a 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -41,7 +41,7 @@ App::post('/v1/storage/files') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_FILE) - ->param('fileId', '', new CustomId(), 'File ID. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('fileId', '', new CustomId(), 'File ID. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('file', [], new File(), 'Binary file.', false) ->param('read', null, new ArrayList(new Text(64)), 'An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.', true) ->param('write', null, new ArrayList(new Text(64)), 'An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.', true) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index ab5534edc6..d9809bf305 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -34,7 +34,7 @@ App::post('/v1/teams') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_TEAM) - ->param('teamId', '', new CustomId(), 'Team ID. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('teamId', '', new CustomId(), 'Team ID. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', null, new Text(128), 'Team name. Max length: 128 chars.') ->param('roles', ['owner'], new ArrayList(new Key()), 'Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.', true) ->inject('response') diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 61a9e24a41..9eebdbf465 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -34,7 +34,7 @@ App::post('/v1/users') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_USER) - ->param('userId', '', new CustomId(), 'User ID. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('userId', '', new CustomId(), 'User ID. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('email', '', new Email(), 'User email.') ->param('password', '', new Password(), 'User password. Must be at least 8 chars.') ->param('name', '', new Text(128), 'User name. Max length: 128 chars.', true) From c57fe89b3be4c3b775f28f6126ef13b959aad511 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Sat, 15 Jan 2022 11:18:16 +0000 Subject: [PATCH 08/53] fix: upgrade chart.js from 3.6.2 to 3.7.0 Snyk has created this PR to upgrade chart.js from 3.6.2 to 3.7.0. See this package in npm: https://www.npmjs.com/package/chart.js See this project in Snyk: https://app.snyk.io/org/eldadfux/project/8574b5e4-6e89-4ade-bc02-2eaabc43eed0?utm_source=github&utm_medium=referral&page=upgrade-pr --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4d6acc54bc..414dafb806 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "license": "BSD-3-Clause", "dependencies": { - "chart.js": "^3.6.2", + "chart.js": "^3.7.0", "markdown-it": "^12.3.0", "pell": "^1.0.6", "prismjs": "^1.25.0", @@ -549,9 +549,9 @@ } }, "node_modules/chart.js": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.6.2.tgz", - "integrity": "sha512-Xz7f/fgtVltfQYWq0zL1Xbv7N2inpG+B54p3D5FSvpCdy3sM+oZhbqa42eNuYXltaVvajgX5UpKCU2GeeJIgxg==" + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.7.0.tgz", + "integrity": "sha512-31gVuqqKp3lDIFmzpKIrBeum4OpZsQjSIAqlOpgjosHDJZlULtvwLEZKtEhIAZc7JMPaHlYMys40Qy9Mf+1AAg==" }, "node_modules/chokidar": { "version": "2.1.8", @@ -5484,9 +5484,9 @@ "dev": true }, "chart.js": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.6.2.tgz", - "integrity": "sha512-Xz7f/fgtVltfQYWq0zL1Xbv7N2inpG+B54p3D5FSvpCdy3sM+oZhbqa42eNuYXltaVvajgX5UpKCU2GeeJIgxg==" + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.7.0.tgz", + "integrity": "sha512-31gVuqqKp3lDIFmzpKIrBeum4OpZsQjSIAqlOpgjosHDJZlULtvwLEZKtEhIAZc7JMPaHlYMys40Qy9Mf+1AAg==" }, "chokidar": { "version": "2.1.8", diff --git a/package.json b/package.json index 9b0ba21e17..d22cc18e1b 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "gulp-less": "^5.0.0" }, "dependencies": { - "chart.js": "^3.6.2", + "chart.js": "^3.7.0", "markdown-it": "^12.3.0", "pell": "^1.0.6", "prismjs": "^1.25.0", From ebcdfaabfb8d7d9352070f5b4d8731443f0c79d2 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 15 Jan 2022 16:50:49 +0200 Subject: [PATCH 09/53] Deny last user from leaving a project, redirect to home if current user leaves --- app/views/console/settings/index.phtml | 30 ++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/app/views/console/settings/index.phtml b/app/views/console/settings/index.phtml index 8ea42f2f6a..7aec7036a6 100644 --- a/app/views/console/settings/index.phtml +++ b/app/views/console/settings/index.phtml @@ -453,7 +453,7 @@ $smtpEnabled = $this->getParam('smtpEnabled', false);
  • -
    getParam('smtpEnabled', false); - + + +
    + +
    + + + + + +
    From e691e75712bd47ab94c1c058d723db68aa0afa75 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 15 Jan 2022 20:34:01 +0200 Subject: [PATCH 10/53] Changed button name --- app/views/console/settings/index.phtml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/console/settings/index.phtml b/app/views/console/settings/index.phtml index 7aec7036a6..e4ad543b2b 100644 --- a/app/views/console/settings/index.phtml +++ b/app/views/console/settings/index.phtml @@ -473,8 +473,8 @@ $smtpEnabled = $this->getParam('smtpEnabled', false); - - + +
    getParam('smtpEnabled', false); - - + +
    From 0722f34347ff0151419d19749493be86b1e59f2a Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 16 Jan 2022 02:47:49 +0400 Subject: [PATCH 11/53] feat: add notion oauth provider --- app/config/providers.php | 10 ++ public/images/users/notion.png | Bin 0 -> 1919 bytes src/Appwrite/Auth/OAuth2/Notion.php | 148 ++++++++++++++++++++++++++++ 3 files changed, 158 insertions(+) create mode 100644 public/images/users/notion.png create mode 100644 src/Appwrite/Auth/OAuth2/Notion.php diff --git a/app/config/providers.php b/app/config/providers.php index bb823c9ab0..3aabbf60c2 100644 --- a/app/config/providers.php +++ b/app/config/providers.php @@ -131,6 +131,16 @@ return [ // Ordered by ABC. 'beta' => false, 'mock' => false, ], + 'notion' => [ + 'name' => 'Notion', + 'developers' => 'https://developers.notion.com/docs', + 'icon' => 'icon-notion', + 'enabled' => true, + 'sandbox' => false, + 'form' => false, + 'beta' => false, + 'mock' => false, + ], 'paypal' => [ 'name' => 'PayPal', 'developers' => 'https://developer.paypal.com/docs/api/overview/', diff --git a/public/images/users/notion.png b/public/images/users/notion.png new file mode 100644 index 0000000000000000000000000000000000000000..4eff411a429ef2362ff3116b06360de2c56c6561 GIT binary patch literal 1919 zcmV-_2Y~pAP)JyO5BOcXxMTVPR2GQ9?pO zGBPqGBqSOd8WIu`3JMAX0|P%lKi}Wqo}QkEhlhB0cxY&7R#sL%K0YZaD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8Bia%M zLtl^%x$4D_EF7B%4GAIxoW92f9+P4+0ysS(#gZr!(gq*pnj)W;KHIT@6gz-W$QxOo;;5r zZM+R9DB@Rr5hwC8YeCq(qtS>tlTk1VM!_f;1)~5B008X2D^0-mgvtN_002ovPDHLk FV1hRVcJ=@O literal 0 HcmV?d00001 diff --git a/src/Appwrite/Auth/OAuth2/Notion.php b/src/Appwrite/Auth/OAuth2/Notion.php new file mode 100644 index 0000000000..748e7958ed --- /dev/null +++ b/src/Appwrite/Auth/OAuth2/Notion.php @@ -0,0 +1,148 @@ +endpoint . '/oauth/authorize?'. \http_build_query([ + 'client_id' => $this->appID, + 'redirect_uri' => $this->callback, + 'response_type' => 'code', + 'state' => \json_encode($this->state), + 'owner' => 'user' + ]); + } + + /** + * @param string $code + * + * @return string + */ + public function getAccessToken(string $code):string + { + $headers = [ + "Authorization: Basic " . \base64_encode($this->appID . ":" . $this->appSecret), + ]; + + $response = $this->request( + 'POST', + $this->endpoint . '/oauth/token', + $headers, + \http_build_query([ + 'grant_type' => 'authorization_code', + 'redirect_uri' => $this->callback, + 'code' => $code + ]) + ); + + $response = \json_decode($response, true); + + if (isset($response['access_token'])) { + return $response['access_token']; + } + + return ''; + } + + /** + * @param $accessToken + * + * @return string + */ + public function getUserID(string $accessToken):string + { + $response = $this->getUser($accessToken); + + if (isset($response['bot']['owner']['user']['id'])) { + return $response['bot']['owner']['user']['id']; + } + + return ''; + } + + /** + * @param $accessToken + * + * @return string + */ + public function getUserEmail(string $accessToken):string + { + $response = $this->getUser($accessToken); + + if(isset($response['bot']['owner']['user']['person']['email'])){ + return $response['bot']['owner']['user']['person']['email']; + } + + return ''; + } + + /** + * @param $accessToken + * + * @return string + */ + public function getUserName(string $accessToken):string + { + $response = $this->getUser($accessToken); + + if (isset($response['bot']['owner']['user']['name'])) { + return $response['bot']['owner']['user']['name']; + } + + return ''; + } + + /** + * @param string $accessToken + * + * @return array + */ + protected function getUser(string $accessToken) + { + $headers = [ + 'Notion-Version: ' . $this->version, + 'Authorization: Bearer '.\urlencode($accessToken) + ]; + + if (empty($this->user)) { + $this->user = \json_decode($this->request('GET', $this->endpoint . '/users/me', $headers), true); + } + + return $this->user; + } +} From 161bb1ec75e725a3d6055dddc32a2074dec6f909 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 16 Jan 2022 03:24:38 +0400 Subject: [PATCH 12/53] fix: delete user and sessions when deleting a user --- app/workers/deletes.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/workers/deletes.php b/app/workers/deletes.php index f4fd667d2a..2dacff626b 100644 --- a/app/workers/deletes.php +++ b/app/workers/deletes.php @@ -190,7 +190,14 @@ class DeletesV1 extends Worker { $userId = $document->getId(); - // Tokens and Sessions removed with user document + // Delete all sessions of this user + $this->deleteByGroup('sessions', [ + new Query('userId', Query::TYPE_EQUAL, [$userId]) + ], $this->getProjectDB($projectId)); + + // Delete user ( tokens are deleted as part of the user object ) + $this->deleteById($document, $this->getProjectDB($projectId)); + // Delete Memberships and decrement team membership counts $this->deleteByGroup('memberships', [ new Query('userId', Query::TYPE_EQUAL, [$userId]) From 6238fcc46a57552699c5dbf4f49dc1d714f28778 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 16 Jan 2022 05:02:13 +0400 Subject: [PATCH 13/53] fix: reset user attrbites and do not delete user --- app/controllers/api/users.php | 7 +++++++ app/workers/deletes.php | 14 ++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 61a9e24a41..ff64259409 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -725,6 +725,11 @@ App::delete('/v1/users/:userId') throw new Exception('User not found', 404); } + /** + * DO NOT DELETE THE USER RECORD ITSELF. + * WE RETAIN THE USER RECORD TO RESERVE THE USER ID AND ENSURE THAT THE USER ID IS NOT REUSED. + */ + // clone user object to send to workers $clone = clone $user; @@ -733,6 +738,8 @@ App::delete('/v1/users/:userId') ->setAttribute("email", null) ->setAttribute("password", null) ->setAttribute("deleted", true) + ->setAttribute("tokens", []) + ->setAttribute("search", null) ; $dbForProject->updateDocument('users', $userId, $user); diff --git a/app/workers/deletes.php b/app/workers/deletes.php index 2dacff626b..8caf7ddb23 100644 --- a/app/workers/deletes.php +++ b/app/workers/deletes.php @@ -188,15 +188,21 @@ class DeletesV1 extends Worker */ protected function deleteUser(Document $document, string $projectId): void { + /** + * DO NOT DELETE THE USER RECORD ITSELF. + * WE RETAIN THE USER RECORD TO RESERVE THE USER ID AND ENSURE THAT THE USER ID IS NOT REUSED. + */ + $userId = $document->getId(); + $user = $this->getProjectDB($projectId)->getDocument('users', $userId); - // Delete all sessions of this user + // Delete all sessions of this user from the sessions table and update the sessions field of the user record $this->deleteByGroup('sessions', [ new Query('userId', Query::TYPE_EQUAL, [$userId]) ], $this->getProjectDB($projectId)); - - // Delete user ( tokens are deleted as part of the user object ) - $this->deleteById($document, $this->getProjectDB($projectId)); + + $user->setAttribute('sessions', []); + $updated = Authorization::skip(fn() => $this->getProjectDB($projectId)->updateDocument('users', $userId, $user)); // Delete Memberships and decrement team membership counts $this->deleteByGroup('memberships', [ From f6b6673bc98b6feac6f99766bff9731c8295b2cc Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 16 Jan 2022 16:03:29 +0400 Subject: [PATCH 14/53] feat: update notion image --- public/images/users/notion.png | Bin 1919 -> 1834 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/public/images/users/notion.png b/public/images/users/notion.png index 4eff411a429ef2362ff3116b06360de2c56c6561..a8694653ca070a5a48f8fd801fb7ec9a00a6afbc 100644 GIT binary patch delta 1798 zcmV+h2l@E_4yq22IDZQh000XU0RWnu7ytkQuTV@>MF0Q*1qB5Z6ciyLAuup7KtMoG zPfuN4U2t%4hlhunnwqk*vdGBD*4Eb3)6=f5u4-y(6B82y0|O8c5Fj8RFE1}VJUmNF zOIli5YinzPfq|Hqn5?X+Ajf{r>*`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k+F%XnYo3f99Bayft9rliB>S#$`CTt&fdY%Nz>WI)y>_*(+eozrJ+QcCEi%g z_3`!e^A8Ag2?`Dg4GUL_P=qPBQHcb}OMh}lkzhx(Bg|Yc2d5b4*fLU)5U&Z+lp7a8k|nZv93pPzw45v%a*TL86RFjpscYb$CA{Qq!g|U46Deo zWHm`vkZFm@NU}tMdCl5Pm336LB#K!9!Esyfs0UFfX+yas8zybsl(>1z)?Q0}*=_K= zu@sSg%&6d#?MPyFJ78*E^Sr~?xsA_EIBT3RBzmzj2!?1Rf}q@5+Ir7#&U z71~)6W(AX4&r35)81};&NOA{gXG!^Pn4F9N%`9O!2yc@5DbUOkhC^`K!?d%cB?Bfq zHHT)FFl52I#}WxNvm|N{On+ML2+b^EIO+hCZ>po2B@D~p3aV*m3BybjRW!0>jU^o{ zVK^p7JxfG!Sz;4Ii6zBeL|MXcd@2Q&pf<5^Tf%UH0!yL_h_vM7De^60m@kLNk|jtA zLvzWur06srODw#N7L>#M>>)?CB@Aa$F)dLjJ|G1Z%AEsKc=9aymVYp;vqQIJ!#RY# z=Ud?l!*>IdqMVNUS~4tQxZs6m$wgm>)aeqJy7t6Pn0FaTVFb6x+$$|e0wh?Xcoof( zB4%D2qWan-Si*2r5;Nk70;(if!l0~6mL)|qNwI_>7&2tuPo(lFrZU!R#aAG`KB6sQ zgs3mYC0~B|dQIj0d4ItdTyALGytU6W`~0-q(Bz^oK&&MU$#=k+;x3fSd#{$Ad#S3c z+Wo)>i!C1F8@==8Bia%MLtl^%x$4D_EF7B%4GAIxoW92f9+P4+0ysS(#gZr!(gq*p znj)W;KHIT@6gz- Date: Sun, 16 Jan 2022 18:37:32 +0200 Subject: [PATCH 15/53] Fixed usage entrypoint in dev mode --- docker-compose.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index c90b38fc5f..1ac7e1b0b0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -412,11 +412,7 @@ services: - _APP_MAINTENANCE_RETENTION_AUDIT appwrite-usage: - entrypoint: - - php - - -e - - /usr/src/code/app/cli.php - - usage + entrypoint: usage container_name: appwrite-usage build: context: . From 96828f739e94ceb13fa982b30d9770f21fd85cc0 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Mon, 17 Jan 2022 11:47:22 +0100 Subject: [PATCH 16/53] fix: ui for int/float default values --- app/views/console/database/collection.phtml | 8 ++++---- app/views/console/database/document.phtml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/console/database/collection.phtml b/app/views/console/database/collection.phtml index 2091209e52..34b9bfa8c4 100644 --- a/app/views/console/database/collection.phtml +++ b/app/views/console/database/collection.phtml @@ -706,10 +706,10 @@ $logs = $this->getParam('logs', null);