Page MenuHomePhorge

D5082.1775289756.diff
No OneTemporary

Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None

D5082.1775289756.diff

diff --git a/kolabctl b/kolabctl
--- a/kolabctl
+++ b/kolabctl
@@ -356,7 +356,7 @@
echo "All containers are available"
# We skip mollie and openexchange
- podman exec $POD-webapp env APP_DEBUG=false ./artisan status:health --check DB --check Redis --check IMAP --check Roundcube --check Meet --check DAV
+ podman exec $POD-webapp env APP_DEBUG=false ./artisan status:health --user="$ADMIN_USER" --password="$ADMIN_PASSWORD" --check DB --check Redis --check IMAP --check Roundcube --check Meet --check DAV --check Auth
echo "Checking postfix authentication"
podman exec $POD-postfix testsaslauthd -u "$ADMIN_USER" -p "$ADMIN_PASSWORD"
echo "Checking imap authentication"
diff --git a/src/app/Console/Commands/Status/Health.php b/src/app/Console/Commands/Status/Health.php
--- a/src/app/Console/Commands/Status/Health.php
+++ b/src/app/Console/Commands/Status/Health.php
@@ -24,7 +24,9 @@
* @var string
*/
protected $signature = 'status:health
- {--check=* : One of DB, Redis, IMAP, LDAP, Roundcube, Meet, DAV, Mollie, OpenExchangeRates, Storage}';
+ {--check=* : One of DB, Redis, IMAP, LDAP, Roundcube, Meet, DAV, Mollie, OpenExchangeRates, Storage, Auth}
+ {--user= : Test user (for Auth test)}
+ {--password= : Password of test user}'; // phpcs:ignore
/**
* The console command description.
@@ -98,6 +100,18 @@
}
}
+ private function checkAuth()
+ {
+ try {
+ $user = \App\User::findByEmail($this->option('user'));
+ $response = \App\Http\Controllers\API\AuthController::logonResponse($user, $this->option('password'));
+ return $response->getData()->status == 'success';
+ } catch (\Exception $exception) {
+ $this->line($exception);
+ return false;
+ }
+ }
+
private function checkRoundcube()
{
try {
@@ -168,6 +182,9 @@
$steps = [
'DB', 'Redis', 'IMAP', 'Roundcube', 'Meet', 'DAV', 'Mollie', 'OpenExchangeRates'
];
+ if (!empty($this->option('user'))) {
+ array_unshift($steps, 'Auth');
+ }
if (\config('app.with_ldap')) {
array_unshift($steps, 'LDAP');
}
@@ -187,7 +204,7 @@
if ($this->{$func}()) {
$this->info("OK");
} else {
- $this->error("Not found");
+ $this->error("Error while checking: $step");
$result = 1;
}
}

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 4, 8:02 AM (2 h, 55 s ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18828485
Default Alt Text
D5082.1775289756.diff (2 KB)

Event Timeline