mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge branch 'feat-database-indexing' into feat-storage-buckets
This commit is contained in:
23 files changed
+101
-111
No files matched your search
@@ -46,8 +46,8 @@ class V06 extends Migration
|
||||
$document->setAttribute('secret', json_encode([
|
||||
'data' => OpenSSL::encrypt($document->getAttribute('secret'), OpenSSL::CIPHER_AES_128_GCM, $key, 0, $iv, $tag),
|
||||
'method' => OpenSSL::CIPHER_AES_128_GCM,
|
||||
'iv' => bin2hex($iv),
|
||||
'tag' => bin2hex($tag),
|
||||
'iv' => \bin2hex($iv),
|
||||
'tag' => \bin2hex($tag ?? ''),
|
||||
'version' => '1',
|
||||
]));
|
||||
}
|
||||
|
||||
@@ -392,10 +392,7 @@ class Swagger2 extends Format
|
||||
|
||||
foreach ($this->models as $model) {
|
||||
foreach ($model->getRules() as $rule) {
|
||||
if (
|
||||
in_array($model->getType(), $usedModels)
|
||||
&& !in_array($rule['type'], ['string', 'integer', 'boolean', 'json', 'float'])
|
||||
) {
|
||||
if (!in_array($rule['type'], ['string', 'integer', 'boolean', 'json', 'float'])) {
|
||||
$usedModels[] = $rule['type'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace Appwrite\Template;
|
||||
|
||||
use Appwrite\Utopia\View;
|
||||
use Exception;
|
||||
use Utopia\View;
|
||||
|
||||
class Template extends View
|
||||
{
|
||||
|
||||
@@ -34,7 +34,6 @@ use Appwrite\Utopia\Response\Model\File;
|
||||
use Appwrite\Utopia\Response\Model\Bucket;
|
||||
use Appwrite\Utopia\Response\Model\Func;
|
||||
use Appwrite\Utopia\Response\Model\Index;
|
||||
use Appwrite\Utopia\Response\Model\FuncPermissions;
|
||||
use Appwrite\Utopia\Response\Model\JWT;
|
||||
use Appwrite\Utopia\Response\Model\Key;
|
||||
use Appwrite\Utopia\Response\Model\Language;
|
||||
@@ -248,7 +247,6 @@ class Response extends SwooleResponse
|
||||
->setModel(new Membership())
|
||||
->setModel(new Func())
|
||||
->setModel(new Runtime())
|
||||
->setModel(new FuncPermissions())
|
||||
->setModel(new Tag())
|
||||
->setModel(new Execution())
|
||||
->setModel(new Project())
|
||||
|
||||
@@ -17,10 +17,10 @@ class Func extends Model
|
||||
'example' => '5e5ea5c16897e',
|
||||
])
|
||||
->addRule('execute', [
|
||||
'type' => Response::MODEL_FUNC_PERMISSIONS,
|
||||
'description' => 'Function permissions.',
|
||||
'default' => new \stdClass,
|
||||
'example' => new \stdClass,
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Execution permissions.',
|
||||
'default' => '',
|
||||
'example' => 'role:member',
|
||||
'array' => false,
|
||||
])
|
||||
->addRule('name', [
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
use Appwrite\Utopia\Response\Model;
|
||||
|
||||
class FuncPermissions extends Model
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this
|
||||
->addRule('execute', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Execution permissions.',
|
||||
'default' => [],
|
||||
'example' => 'user:5e5ea5c16897e',
|
||||
'array' => true,
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName():string
|
||||
{
|
||||
return 'FuncPermissions';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Collection
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType():string
|
||||
{
|
||||
return Response::MODEL_FUNC_PERMISSIONS;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia;
|
||||
|
||||
use Utopia\View as OldView;
|
||||
|
||||
class View extends OldView
|
||||
{
|
||||
/**
|
||||
* Escape
|
||||
*
|
||||
* Convert all applicable characters to HTML entities
|
||||
*
|
||||
* @param string $str
|
||||
* @return string
|
||||
* @deprecated Use print method with escape filter
|
||||
*/
|
||||
public function escape($str)
|
||||
{
|
||||
return \htmlentities($str, ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user