mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
add some fixes
This commit is contained in:
+1
-1
@@ -163,7 +163,7 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($dbForConsole->getDocument('buckets', 'default')->isEmpty()) {
|
||||
if ($dbForConsole->getDocument('buckets', 'default')->isEmpty() && !$dbForConsole->exists(App::getEnv('_APP_DB_SCHEMA', 'appwrite'), 'bucket_1')) {
|
||||
Console::success('[Setup] - Creating default bucket...');
|
||||
$dbForConsole->createDocument('buckets', new Document([
|
||||
'$id' => ID::custom('default'),
|
||||
|
||||
+1
-1
@@ -434,7 +434,7 @@ Database::addFilter(
|
||||
}
|
||||
$value = json_decode($value, true);
|
||||
$key = App::getEnv('_APP_OPENSSL_KEY_V' . $value['version']);
|
||||
|
||||
var_dump(OpenSSL::decrypt($value['data'], $value['method'], $key, 0, hex2bin($value['iv']), hex2bin($value['tag'])));
|
||||
return OpenSSL::decrypt($value['data'], $value['method'], $key, 0, hex2bin($value['iv']), hex2bin($value['tag']));
|
||||
}
|
||||
);
|
||||
|
||||
@@ -965,7 +965,7 @@ class V15 extends Migration
|
||||
break;
|
||||
|
||||
default:
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
usleep(50000);
|
||||
@@ -1000,6 +1000,15 @@ class V15 extends Migration
|
||||
* Populate permissions attribute.
|
||||
*/
|
||||
$this->populatePermissionsAttribute($document, addCreatePermission: false);
|
||||
$document->setAttribute('$permissions', Permission::read(Role::any()), Document::SET_TYPE_APPEND);
|
||||
break;
|
||||
|
||||
case 'sessions':
|
||||
$userId = $document->getAttribute('userId');
|
||||
$document
|
||||
->setAttribute('$permissions', Permission::read(Role::user($userId)), Document::SET_TYPE_APPEND)
|
||||
->setAttribute('$permissions', Permission::update(Role::user($userId)), Document::SET_TYPE_APPEND)
|
||||
->setAttribute('$permissions', Permission::delete(Role::user($userId)), Document::SET_TYPE_APPEND);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user