org -> unit change, some new functionality

This commit is contained in:
Dennis Eichhorn 2023-01-26 21:54:13 +01:00
parent 081da4ec2f
commit 26c847f838
3 changed files with 6 additions and 6 deletions

View File

@ -143,7 +143,7 @@ final class Application
$this->app->eventManager = new EventManager($this->app->dispatcher);
$this->app->accountManager = new AccountManager($this->app->sessionManager);
$this->app->l11nServer = LocalizationMapper::get()->where('id', 1)->execute();
$this->app->orgId = $this->getApplicationOrganization($request, $this->config['app']);
$this->app->unitId = $this->getApplicationOrganization($request, $this->config['app']);
$aid = Auth::authenticate($this->app->sessionManager);
$request->header->account = $aid;
@ -174,7 +174,7 @@ final class Application
$pageView = new QAView($this->app->l11nManager, $request, $response);
$head = new Head();
$pageView->setData('orgId', $this->app->orgId);
$pageView->setData('unitId', $this->app->unitId);
$pageView->setData('head', $head);
$response->set('Content', $pageView);
@ -213,7 +213,7 @@ final class Application
$request->getData('CSRF'),
$request->getRouteVerb(),
$this->app->appName,
$this->app->orgId,
$this->app->unitId,
$account,
$request->getData()
),

View File

@ -19,8 +19,8 @@
"type": "INT",
"default": null,
"null": true,
"foreignTable": "organization_unit",
"foreignKey": "organization_unit_id"
"foreignTable": "unit",
"foreignKey": "unit_id"
}
}
},

View File

@ -61,7 +61,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
};
$this->app->dbPool = $GLOBALS['dbpool'];
$this->app->orgId = 1;
$this->app->unitId = 1;
$this->app->accountManager = new AccountManager($GLOBALS['session']);
$this->app->appSettings = new CoreSettings();
$this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules/');