* [FIX] Fixed wrong Acl behavior

* [FIX] Minor bugfixes
* [MOD] Updated db schema
This commit is contained in:
nuxsmin
2018-03-19 20:41:38 +01:00
parent b7504f9f72
commit 85de6fd507
11 changed files with 122 additions and 146 deletions

View File

@@ -145,7 +145,7 @@ class AuthTokenController extends ControllerBase implements CrudControllerInterf
$this->view->assign('readonly');
}
$this->view->assign('customFields', $this->getCustomFieldsForItem(ActionsInterface::AUTHTOKEN, $authTokenId));
$this->view->assign('customFields', $this->getCustomFieldsForItem(ActionsInterface::AUTHTOKEN, $authTokenId, $this->session));
}
/**

View File

@@ -139,7 +139,7 @@ class CategoryController extends ControllerBase implements CrudControllerInterfa
$this->view->assign('readonly');
}
$this->view->assign('customFields', $this->getCustomFieldsForItem(ActionsInterface::CATEGORY, $categoryId));
$this->view->assign('customFields', $this->getCustomFieldsForItem(ActionsInterface::CATEGORY, $categoryId, $this->session));
}
/**

View File

@@ -140,7 +140,7 @@ class ClientController extends ControllerBase implements CrudControllerInterface
$this->view->assign('readonly');
}
$this->view->assign('customFields', $this->getCustomFieldsForItem(ActionsInterface::CLIENT, $clientId));
$this->view->assign('customFields', $this->getCustomFieldsForItem(ActionsInterface::CLIENT, $clientId, $this->session));
}
/**

View File

@@ -81,7 +81,7 @@ class ConfigGeneralController extends SimpleControllerBase
$configData->setLogEnabled($logEnabled);
$configData->setLogEvents(Request::analyzeArray('log_events', function ($items) {
return ConfigUtil::eventsAdapter($items);
}));
}, []));
$configData->setSyslogEnabled($syslogEnabled);

View File

@@ -132,7 +132,7 @@ abstract class SimpleControllerBase
*/
protected function checkAccess($action)
{
if (!$this->session->getUserData()->getIsAdminApp() || !$this->acl->checkUserAccess($action)) {
if (!$this->session->getUserData()->getIsAdminApp() && !$this->acl->checkUserAccess($action)) {
throw new UnauthorizedPageException(UnauthorizedPageException::INFO);
}
}

View File

@@ -148,7 +148,7 @@ class UserController extends ControllerBase implements CrudControllerInterface
$this->view->assign('readonly');
}
$this->view->assign('customFields', $this->getCustomFieldsForItem(ActionsInterface::USER, $userId));
$this->view->assign('customFields', $this->getCustomFieldsForItem(ActionsInterface::USER, $userId, $this->session));
}
/**

View File

@@ -148,7 +148,7 @@ class UserGroupController extends ControllerBase implements CrudControllerInterf
$this->view->assign('readonly');
}
$this->view->assign('customFields', $this->getCustomFieldsForItem(ActionsInterface::GROUP, $userGroupId));
$this->view->assign('customFields', $this->getCustomFieldsForItem(ActionsInterface::GROUP, $userGroupId, $this->session));
}
/**

View File

@@ -143,7 +143,7 @@ class UserProfileController extends ControllerBase implements CrudControllerInte
$this->view->assign('readonly');
}
$this->view->assign('customFields', $this->getCustomFieldsForItem(ActionsInterface::PROFILE, $profileId));
$this->view->assign('customFields', $this->getCustomFieldsForItem(ActionsInterface::PROFILE, $profileId, $this->session));
}
/**