Merge branch 'master' of github.com:appwrite/appwrite into swoole
This commit is contained in:
commit
1b897b4223
|
@ -43,6 +43,7 @@
|
|||
- Fixed bug denying authentication with Github OAuth provider
|
||||
- New OAuth adapter for Box.com
|
||||
- New OAuth adapter for PayPal sandbox
|
||||
- Fixed a bug making read permission overwrite write permission in some cases
|
||||
|
||||
## Breaking Changes (Read before upgrading)
|
||||
- **Deprecated** `first` and `last` query params for documents list route in the database API
|
||||
|
|
|
@ -609,7 +609,7 @@ App::patch('/v1/database/collections/:collectionId/documents/:documentId')
|
|||
}
|
||||
|
||||
if (!empty($write)) { // Overwrite permissions only when passed
|
||||
$data['$permissions']['write'] = $read;
|
||||
$data['$permissions']['write'] = $write;
|
||||
}
|
||||
|
||||
$data = \array_merge($document->getArrayCopy(), $data);
|
||||
|
|
|
@ -415,8 +415,8 @@ trait DatabaseBase
|
|||
'name' => 'Thor: Ragnaroc',
|
||||
'releaseYear' => 2017,
|
||||
],
|
||||
'read' => ['user:'.$this->getUser()['$id']],
|
||||
'write' => ['user:'.$this->getUser()['$id']],
|
||||
'read' => ['user:'.$this->getUser()['$id'], 'testx'],
|
||||
'write' => ['user:'.$this->getUser()['$id'], 'testy'],
|
||||
]);
|
||||
|
||||
$id = $document['body']['$id'];
|
||||
|
@ -425,6 +425,8 @@ trait DatabaseBase
|
|||
$this->assertEquals($document['headers']['status-code'], 201);
|
||||
$this->assertEquals($document['body']['name'], 'Thor: Ragnaroc');
|
||||
$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([
|
||||
'content-type' => 'application/json',
|
||||
|
|
Loading…
Reference in a new issue