title: Symfony - how to know if console command was run from controller or it was run from terminal?
body: <p>I am building Symfony Application that use console commands. The same console command can be executed from controller thrue events, but it also can be run from terminal. How can I figure it out from where the command was run so that I can implement the user authentication if the command was run from terminal. If the command was run from controller then user already has permission to run. But if it has been run from terminal he must authenticate by username and password so that I check if he has necessary role?</p>