Merge branch 'develop' into feature/react-admin

This commit is contained in:
Matthew Penner 2021-06-06 13:54:04 -06:00
commit 01c03b6b77
19 changed files with 614 additions and 274 deletions

View file

@ -37,6 +37,7 @@ class EmailSettingsCommand extends Command
{--encryption=}
{--host=}
{--port=}
{--endpoint=}
{--username=}
{--password=}';
@ -140,6 +141,11 @@ class EmailSettingsCommand extends Command
trans('command/messages.environment.mail.ask_mailgun_secret'),
$this->config->get('services.mailgun.secret')
);
$this->variables['MAILGUN_ENDPOINT'] = $this->option('endpoint') ?? $this->ask(
trans('command/messages.environment.mail.ask_mailgun_endpoint'),
$this->config->get('services.mailgun.endpoint')
);
}
/**

View file

@ -28,7 +28,7 @@ class PruneOrphanedBackupsCommand extends Command
$query = $repository->getBuilder()
->whereNull('completed_at')
->whereDate('created_at', '<=', CarbonImmutable::now()->subMinutes($since));
->where('created_at', '<=', CarbonImmutable::now()->subMinutes($since)->toDateTimeString());
$count = $query->count();
if (!$count) {

View file

@ -47,7 +47,7 @@ class ServerController extends ApplicationApiController
}
$servers = QueryBuilder::for(Server::query())
->allowedFilters(['uuid', 'name', 'image', 'external_id'])
->allowedFilters(['uuid', 'uuidShort', 'name', 'image', 'external_id'])
->allowedSorts(['id', 'uuid', 'uuidShort', 'name', 'owner_id', 'node_id', 'status'])
->paginate($perPage);

View file

@ -55,7 +55,7 @@ class DaemonAuthenticate
}
if (is_null($bearer = $request->bearerToken())) {
throw new HttpException(401, 'Access this this endpoint must include an Authorization header.', null, ['WWW-Authenticate' => 'Bearer']);
throw new HttpException(401, 'Access to this endpoint must include an Authorization header.', null, ['WWW-Authenticate' => 'Bearer']);
}
$parts = explode('.', $bearer);

View file

@ -107,7 +107,7 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
public function assignUserToDatabase(string $database, string $username, string $remote): bool
{
return $this->run(sprintf(
'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, LOCK TABLES, EXECUTE ON `%s`.* TO `%s`@`%s`',
'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, LOCK TABLES, CREATE ROUTINE, ALTER ROUTINE, EXECUTE ON `%s`.* TO `%s`@`%s`',
$database,
$username,
$remote