Skip to content

Commit 3902518

Browse files
committed
Fixes for cursorbot
1 parent d75aab5 commit 3902518

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

ProcessMaker/Console/Commands/TenantsVerify.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,19 @@ class TenantsVerify extends Command
3737

3838
public function handle()
3939
{
40+
if (!config('app.multitenancy')) {
41+
$this->info('Multitenancy is disabled');
42+
43+
return;
44+
}
45+
4046
$errors = [];
4147
$currentTenant = null;
4248
if (app()->has('currentTenant')) {
4349
$currentTenant = app('currentTenant');
4450
}
4551

46-
if (config('app.multitenancy') && !$currentTenant) {
52+
if (!$currentTenant) {
4753
$this->error('Multitenancy enabled but no current tenant found.');
4854

4955
return;

ProcessMaker/Multitenancy/SwitchTenant.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,12 @@ private function overrideConfigs(Application $app, IsTenant $tenant)
101101
}
102102

103103
// Filesystem roots
104-
$newStoragePath = storage_path('tenant_' . $tenant->id);
104+
$landlordStoragePath = base_path('storage');
105+
$newStoragePath = base_path('storage/tenant_' . $tenant->id);
105106
foreach ($this->landlordConfig('filesystems.disks') as $disk => $config) {
106107
if (isset($config['root'])) {
107108
$this->setConfig('filesystems.disks.' . $disk . '.root', str_replace(
108-
storage_path(),
109+
$landlordStoragePath,
109110
$newStoragePath,
110111
$config['root']
111112
));

0 commit comments

Comments
 (0)