Review fixes
This commit is contained in:
parent
fe5d3a1892
commit
b2e659bd3f
|
@ -142,7 +142,7 @@ Learn more at our [Technology Stack](#technology-stack) section.
|
|||
|
||||
##### Security
|
||||
|
||||
- [Appwrite Auth and ACL](https://github.com/appwrite/appwrite/blob/0.16.x/docs/specs/authentication.drawio.svg)
|
||||
- [Appwrite Auth and ACL](https://github.com/appwrite/appwrite/blob/master/docs/specs/authentication.drawio.svg)
|
||||
- [OAuth](https://en.wikipedia.org/wiki/OAuth)
|
||||
- [Encryption](https://medium.com/searchencrypt/what-is-encryption-how-does-it-work-e8f20e340537#:~:text=Encryption%20is%20a%20process%20that,%2C%20or%20decrypt%2C%20the%20information.)
|
||||
- [Hashing](https://searchsqlserver.techtarget.com/definition/hashing#:~:text=Hashing%20is%20the%20transformation%20of,it%20using%20the%20original%20value.)
|
||||
|
|
|
@ -2224,14 +2224,10 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum
|
|||
|
||||
$data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array
|
||||
|
||||
if (empty($data) && empty($permissions)) {
|
||||
if (empty($data) && \is_null($permissions)) {
|
||||
throw new Exception('Missing payload or permissions', 400, Exception::DOCUMENT_MISSING_PAYLOAD);
|
||||
}
|
||||
|
||||
if (!\is_array($data)) {
|
||||
throw new Exception('Data param should be a valid JSON object', 400, Exception::DOCUMENT_INVALID_STRUCTURE);
|
||||
}
|
||||
|
||||
$database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
if ($database->isEmpty()) {
|
||||
|
|
|
@ -95,7 +95,6 @@ App::post('/v1/projects')
|
|||
Permission::update(Role::team($teamId, 'developer')),
|
||||
Permission::delete(Role::team($teamId, 'owner')),
|
||||
Permission::delete(Role::team($teamId, 'developer')),
|
||||
|
||||
],
|
||||
'name' => $name,
|
||||
'teamInternalId' => $team->getInternalId(),
|
||||
|
|
|
@ -170,6 +170,7 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) {
|
|||
'enabled' => true,
|
||||
'encryption' => true,
|
||||
'antivirus' => true,
|
||||
'fileSecurity' => true,
|
||||
'$permissions' => [
|
||||
Permission::read(Role::any()),
|
||||
Permission::update(Role::any()),
|
||||
|
|
Loading…
Reference in a new issue