Uses init hook to initilize AccessControl

This commit is contained in:
Vlad
2017-08-29 23:30:01 -04:00
parent 053f9e0cdf
commit 59482b2bfa

View File

@@ -22,7 +22,6 @@ class Initializer {
'version' => '1.0.0' 'version' => '1.0.0'
)) { )) {
Env::init($params['file'], $params['version']); Env::init($params['file'], $params['version']);
$this->access_control = new AccessControl();
} }
function init() { function init() {
@@ -91,6 +90,8 @@ class Initializer {
function onInit() { function onInit() {
try { try {
$this->setupAccessControl();
$this->maybeDbUpdate(); $this->maybeDbUpdate();
$this->setupInstaller(); $this->setupInstaller();
$this->setupUpdater(); $this->setupUpdater();
@@ -132,6 +133,10 @@ class Initializer {
} }
} }
function setupAccessControl() {
$this->access_control = new AccessControl();
}
function setupInstaller() { function setupInstaller() {
$installer = new Installer( $installer = new Installer(
Installer::PREMIUM_PLUGIN_SLUG Installer::PREMIUM_PLUGIN_SLUG