mirror of
https://github.com/Karaka-Management/oms-QA.git
synced 2026-02-17 08:18:40 +00:00
org -> unit change, some new functionality
This commit is contained in:
parent
081da4ec2f
commit
26c847f838
|
|
@ -143,7 +143,7 @@ final class Application
|
||||||
$this->app->eventManager = new EventManager($this->app->dispatcher);
|
$this->app->eventManager = new EventManager($this->app->dispatcher);
|
||||||
$this->app->accountManager = new AccountManager($this->app->sessionManager);
|
$this->app->accountManager = new AccountManager($this->app->sessionManager);
|
||||||
$this->app->l11nServer = LocalizationMapper::get()->where('id', 1)->execute();
|
$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);
|
$aid = Auth::authenticate($this->app->sessionManager);
|
||||||
$request->header->account = $aid;
|
$request->header->account = $aid;
|
||||||
|
|
@ -174,7 +174,7 @@ final class Application
|
||||||
$pageView = new QAView($this->app->l11nManager, $request, $response);
|
$pageView = new QAView($this->app->l11nManager, $request, $response);
|
||||||
$head = new Head();
|
$head = new Head();
|
||||||
|
|
||||||
$pageView->setData('orgId', $this->app->orgId);
|
$pageView->setData('unitId', $this->app->unitId);
|
||||||
$pageView->setData('head', $head);
|
$pageView->setData('head', $head);
|
||||||
$response->set('Content', $pageView);
|
$response->set('Content', $pageView);
|
||||||
|
|
||||||
|
|
@ -213,7 +213,7 @@ final class Application
|
||||||
$request->getData('CSRF'),
|
$request->getData('CSRF'),
|
||||||
$request->getRouteVerb(),
|
$request->getRouteVerb(),
|
||||||
$this->app->appName,
|
$this->app->appName,
|
||||||
$this->app->orgId,
|
$this->app->unitId,
|
||||||
$account,
|
$account,
|
||||||
$request->getData()
|
$request->getData()
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@
|
||||||
"type": "INT",
|
"type": "INT",
|
||||||
"default": null,
|
"default": null,
|
||||||
"null": true,
|
"null": true,
|
||||||
"foreignTable": "organization_unit",
|
"foreignTable": "unit",
|
||||||
"foreignKey": "organization_unit_id"
|
"foreignKey": "unit_id"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
};
|
};
|
||||||
|
|
||||||
$this->app->dbPool = $GLOBALS['dbpool'];
|
$this->app->dbPool = $GLOBALS['dbpool'];
|
||||||
$this->app->orgId = 1;
|
$this->app->unitId = 1;
|
||||||
$this->app->accountManager = new AccountManager($GLOBALS['session']);
|
$this->app->accountManager = new AccountManager($GLOBALS['session']);
|
||||||
$this->app->appSettings = new CoreSettings();
|
$this->app->appSettings = new CoreSettings();
|
||||||
$this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules/');
|
$this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules/');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user