Skip to content

Instantly share code, notes, and snippets.

@jaguerra
Last active October 15, 2015 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaguerra/ca7467bc19b73a9c095c to your computer and use it in GitHub Desktop.
Save jaguerra/ca7467bc19b73a9c095c to your computer and use it in GitHub Desktop.
Execute CLI extbase CommandController as an admin user
<?php
namespace My\MyExtension\Command;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class MyCommandController extends \TYPO3\CMS\Extbase\Mvc\Controller\CommandController {
/**
* Make _cli_lowlevel admin for this controller...
*/
protected $requestAdminPermissions = TRUE;
}
@helhum
Copy link

helhum commented Oct 14, 2015

Why not just:

class MyCommandController extends \TYPO3\CMS\Extbase\Mvc\Controller\CommandController {

    protected $requestAdminPermissions = TRUE;
}

@jaguerra
Copy link
Author

@helhum Ups... yes! Way simpler 👍 🔪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment