/** * {@InheritDoc} */ public function init() { // Admins only! if (!Session::isSystemAdmin()) { throw new \CHttpException(HttpResponse::Forbidden, 'Access Denied.'); } parent::init(); // We want merged update/create... $this->setSingleViewMode(true); $this->layout = 'mobile'; $this->defaultAction = 'index'; // Everything is auth-required $this->addUserActions(static::Authenticated, array('cache', 'index', 'update', 'error', 'create')); // Set the command map static::$_cacheCommandMap = array('flush' => function () { return Platform::storeDeleteAll(); }); }
/** * Displays the system configuration page if an admin */ public function actionConfig() { if (!Session::isSystemAdmin()) { throw new NotFoundException(); } phpinfo(INFO_ALL); Pii::end(); }