chore(tests): UT for ACL actions

Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
Rubén D
2023-11-16 06:49:25 +01:00
parent 2d56422d9c
commit efc606cb91
255 changed files with 1949 additions and 1577 deletions

View File

@@ -27,7 +27,7 @@ namespace SP\Modules\Web\Controllers\Plugin;
use Exception;
use SP\Core\Acl\Acl;
use SP\Core\Acl\ActionsInterface;
use SP\Core\Acl\AclActionsInterface;
use SP\Core\Application;
use SP\Core\Events\Event;
use SP\Domain\Plugin\Ports\PluginServiceInterface;
@@ -73,7 +73,7 @@ final class ViewController extends ControllerBase
public function viewAction(int $id): bool
{
try {
if (!$this->acl->checkUserAccess(ActionsInterface::PLUGIN_VIEW)) {
if (!$this->acl->checkUserAccess(AclActionsInterface::PLUGIN_VIEW)) {
return $this->returnJsonResponse(
JsonResponse::JSON_ERROR,
__u('You don\'t have permission to do this operation')
@@ -118,7 +118,7 @@ final class ViewController extends ControllerBase
$this->view->assign('plugin', $pluginData);
$this->view->assign('pluginInfo', $pluginInfo);
$this->view->assign('nextAction', Acl::getActionRoute(ActionsInterface::ITEMS_MANAGE));
$this->view->assign('nextAction', Acl::getActionRoute(AclActionsInterface::ITEMS_MANAGE));
if ($this->view->isView === true) {
$this->view->assign('disabled', 'disabled');