Merge branch 'master' of github.com:appwrite/appwrite into functions
This commit is contained in:
commit
286b42787f
7 changed files with 10 additions and 3 deletions
|
@ -39,6 +39,7 @@
|
||||||
- Fixed bug denying authentication with Github OAuth provider
|
- Fixed bug denying authentication with Github OAuth provider
|
||||||
- New OAuth adapter for Box.com
|
- New OAuth adapter for Box.com
|
||||||
- New OAuth adapter for PayPal sandbox
|
- New OAuth adapter for PayPal sandbox
|
||||||
|
- Fixed a bug making read permission overwrite write permission in some cases
|
||||||
|
|
||||||
## Breaking Changes
|
## Breaking Changes
|
||||||
- **Deprecated** `first` and `last` query params for documents list route in the database API
|
- **Deprecated** `first` and `last` query params for documents list route in the database API
|
||||||
|
|
|
@ -613,7 +613,7 @@ $utopia->patch('/v1/database/collections/:collectionId/documents/:documentId')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($write)) { // Overwrite permissions only when passed
|
if (!empty($write)) { // Overwrite permissions only when passed
|
||||||
$data['$permissions']['write'] = $read;
|
$data['$permissions']['write'] = $write;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = \array_merge($document->getArrayCopy(), $data);
|
$data = \array_merge($document->getArrayCopy(), $data);
|
||||||
|
|
1
docs/specs/custom-domains.drawio.svg
Normal file
1
docs/specs/custom-domains.drawio.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 48 KiB |
1
docs/specs/functions.drawio.svg
Normal file
1
docs/specs/functions.drawio.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 42 KiB |
1
docs/specs/overview.drawio.svg
Normal file
1
docs/specs/overview.drawio.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 88 KiB |
1
docs/specs/realtime.drawio.svg
Normal file
1
docs/specs/realtime.drawio.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 37 KiB |
|
@ -415,8 +415,8 @@ trait DatabaseBase
|
||||||
'name' => 'Thor: Ragnaroc',
|
'name' => 'Thor: Ragnaroc',
|
||||||
'releaseYear' => 2017,
|
'releaseYear' => 2017,
|
||||||
],
|
],
|
||||||
'read' => ['user:'.$this->getUser()['$id']],
|
'read' => ['user:'.$this->getUser()['$id'], 'testx'],
|
||||||
'write' => ['user:'.$this->getUser()['$id']],
|
'write' => ['user:'.$this->getUser()['$id'], 'testy'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$id = $document['body']['$id'];
|
$id = $document['body']['$id'];
|
||||||
|
@ -425,6 +425,8 @@ trait DatabaseBase
|
||||||
$this->assertEquals($document['headers']['status-code'], 201);
|
$this->assertEquals($document['headers']['status-code'], 201);
|
||||||
$this->assertEquals($document['body']['name'], 'Thor: Ragnaroc');
|
$this->assertEquals($document['body']['name'], 'Thor: Ragnaroc');
|
||||||
$this->assertEquals($document['body']['releaseYear'], 2017);
|
$this->assertEquals($document['body']['releaseYear'], 2017);
|
||||||
|
$this->assertEquals($document['body']['$permissions']['read'][1], 'testx');
|
||||||
|
$this->assertEquals($document['body']['$permissions']['write'][1], 'testy');
|
||||||
|
|
||||||
$document = $this->client->call(Client::METHOD_PATCH, '/database/collections/' . $collection . '/documents/' . $id, array_merge([
|
$document = $this->client->call(Client::METHOD_PATCH, '/database/collections/' . $collection . '/documents/' . $id, array_merge([
|
||||||
'content-type' => 'application/json',
|
'content-type' => 'application/json',
|
||||||
|
|
Loading…
Reference in a new issue