Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict Process execution to Permission #166

Closed
ctippler opened this issue Feb 7, 2023 · 5 comments
Closed

Restrict Process execution to Permission #166

ctippler opened this issue Feb 7, 2023 · 5 comments

Comments

@ctippler
Copy link
Contributor

ctippler commented Feb 7, 2023

No description provided.

@ctippler ctippler changed the title Restrict Process exectuion to Permission Restrict Process execution to Permission Feb 7, 2023
@ctippler ctippler closed this as completed Feb 7, 2023
@NiklasBr
Copy link
Contributor

NiklasBr commented Feb 17, 2023

Got this message after updating from v4.0.24 to v4.1.0 and no configurations are now available in the UI.

Timestamp: Fri Feb 17 2023 10:54:33 GMT+0100 (centraleuropeisk normaltid)
Status: 500 | Internal Server Error
URL: /admin/elementsprocessmanager/index/get-plugin-config
Message: Elements\Bundle\ProcessManagerBundle\Model\Configuration::setRestrictToPermissions(): Argument #1 ($restrictToPermissions) must be of type array|string, null given, called in /var/www/pimcore/vendor/pimcore/pimcore/lib/Model/AbstractModel.php on line 205
Trace: 
in /var/www/pimcore/vendor/elements/process-manager-bundle/src/Model/Configuration.php:416
#0 /var/www/pimcore/vendor/pimcore/pimcore/lib/Model/AbstractModel.php(205): Elements\Bundle\ProcessManagerBundle\Model\Configuration->setRestrictToPermissions(NULL)
#1 /var/www/pimcore/vendor/pimcore/pimcore/lib/Model/AbstractModel.php(187): Pimcore\Model\AbstractModel->setValue('restrictToPermi...', NULL)
#2 /var/www/pimcore/vendor/elements/process-manager-bundle/src/Model/Dao/AbstractDao.php(73): Pimcore\Model\AbstractModel->setValues(Array)
#3 /var/www/pimcore/vendor/elements/process-manager-bundle/src/Model/Configuration/Dao.php(85): Elements\Bundle\ProcessManagerBundle\Model\Dao\AbstractDao->getById('4')
#4 /var/www/pimcore/vendor/elements/process-manager-bundle/src/Model/Configuration.php(134): Elements\Bundle\ProcessManagerBundle\Model\Configuration\Dao->getById('4')
#5 /var/www/pimcore/vendor/elements/process-manager-bundle/src/Model/Configuration/Listing/Dao.php(40): Elements\Bundle\ProcessManagerBundle\Model\Configuration::getById('4')
#6 [internal function]: Elements\Bundle\ProcessManagerBundle\Model\Configuration\Listing\Dao->load()
#7 /var/www/pimcore/vendor/pimcore/pimcore/lib/Model/AbstractModel.php(245): call_user_func_array(Array, Array)
#8 /var/www/pimcore/vendor/elements/process-manager-bundle/src/Controller/IndexController.php(92): Pimcore\Model\AbstractModel->__call('load', Array)
#9 /var/www/pimcore/vendor/symfony/http-kernel/HttpKernel.php(163): Elements\Bundle\ProcessManagerBundle\Controller\IndexController->getPluginConfigAction(Object(Symfony\Component\HttpFoundation\Request), Object(Elements\Bundle\ProcessManagerBundle\Service\CommandsValidator), Object(Pimcore\Translation\Translator))
#10 /var/www/pimcore/vendor/symfony/http-kernel/HttpKernel.php(75): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#11 /var/www/pimcore/vendor/symfony/http-kernel/Kernel.php(202): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#12 /var/www/pimcore/public/index.php(36): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#13 {main}

@ctippler
Copy link
Contributor Author

Hi, have you also executed
./bin/console doctrine:migrations:migrate --prefix=Elements\Bundle\ProcessManagerBundle

Does the bundle_process_manager_configuration table has a column "restrictToPermissions"?

regards,
Christian

@NiklasBr
Copy link
Contributor

NiklasBr commented Feb 17, 2023

Yes, the content of restrictToPermissions is NULL in all items.

image

 WARNING! You are about to execute a migration in database "pimcore" that could result in schema changes and data loss. Are you sure you wish to continue? (yes/no) [yes]:
 >


 [OK] Already at the latest version ("Elements\Bundle\ProcessManagerBundle\Migrations\Version20230207000000")

@ctippler
Copy link
Contributor Author

Could you pleas try to update to 4.1.1 - the latest migration should fix the issue

@NiklasBr
Copy link
Contributor

Works great now, thanks! 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants