mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
Isolate Users (#431)
* WIP to isolate users * Resolved issue with SSH AsUser Updated Isolated User Script to use Server User for Team Access Updated Path creation script to simplify for running as the isolated user * Included the server user * PHPMyAdmin script updated Wordpress Script Updated Updated Execute Script to support executing as isolated users * Issue Resolution & Resolved Failing Unit Tests * Fix for isolated_username vs user * Run the deploy as the isolated user * queue updates for isolated user * Support isolated users in cronjobs * script tests for isolated users * Queue tests for isolated users * Cronjob tests for isolated user * Removed default queue command for laravel apps * add default user to factory * laravel pint fixes * ensure echos are consistent * removed unneeded parameter * update * fix queues for isolated users * revert addslashes --------- Co-authored-by: Saeed Vaziry <mr.saeedvaziry@gmail.com>
This commit is contained in:
@ -43,7 +43,6 @@ public function init(Server $server, ?string $asUser = null): self
|
||||
$this->server = $server->refresh();
|
||||
$this->user = $server->getSshUser();
|
||||
if ($asUser && $asUser != $server->getSshUser()) {
|
||||
$this->user = $asUser;
|
||||
$this->asUser = $asUser;
|
||||
}
|
||||
$this->privateKey = PublicKeyLoader::loadPrivateKey(
|
||||
@ -146,6 +145,10 @@ public function exec(string $command, string $log = '', ?int $siteId = null, ?bo
|
||||
return $output;
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
Log::error('Error executing command', [
|
||||
'msg' => $e->getMessage(),
|
||||
'log' => $this->log,
|
||||
]);
|
||||
throw new SSHCommandError(
|
||||
message: $e->getMessage(),
|
||||
log: $this->log
|
||||
|
Reference in New Issue
Block a user