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

Impossible to run with different system user #10

Closed
ITspirit opened this issue Dec 20, 2018 · 2 comments
Closed

Impossible to run with different system user #10

ITspirit opened this issue Dec 20, 2018 · 2 comments
Assignees

Comments

@ITspirit
Copy link
Contributor

The Function
\Pimcore\Tool\Console::checkExecutingUser();
allows to pass an array with allowes users to execute.
Within ProcessManager in the Trait these function is been called at Line 114 within "initProcessManager"

In the Sample Command there is an additional call to the same method.
There i've the option to pass more differente users like:

    \Pimcore\Tool\Console::checkExecutingUser(['www-data', 'deployer', 'vagrant']);

Would make sense to give the option to initProcessManager, maybe in this manner:

$allowedUsers = isset($options['allowedUsers']) && is_array($options['allowedUsers']) ? $options['allowedUsers'] : [];
unset($options['allowedUsers']);
........
\Pimcore\Tool\Console::checkExecutingUser($allowedUsers);
@ctippler ctippler self-assigned this Dec 20, 2018
@ctippler
Copy link
Contributor

Hi,

thx for the hint with the sample command - it was redundant so i removed it from the SampleCommand.

I think we could define the users which are allowed to execute the processes globally - so we don't have to define them on each command. What do you think?

As in 820f28c you would just have to add the users in the "additionalScriptExecutionUsers" config parameter.

@ITspirit
Copy link
Contributor Author

The global define makes sense, sure. Makes it a lot easier to define.
Great 👍

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