On Fri, Nov 1, 2013 at 7:24 PM, Julian Vidal <[email protected]> wrote:

> Is this the right way to approach this situation? Can anyone suggest a
> better alternative?
>

Change the default role when in CLI environment.

For example, using BjyAuthorize:

// authenticate as admin in case we're running from CLI
if(Console::isConsole()) {
    /** @var AuthenticationIdentityProvider $identityProvider */
    $identityProvider =
$this->sm->get('BjyAuthorize\Provider\Identity\ProviderInterface');
    $identityProvider->setDefaultRole('admin');
    $identityProvider->setAuthenticatedRole('admin');
}


-- 
[email protected]
+48 695 600 936
http://thinkscape.pro

Reply via email to