/** * Gets credentials the user must have to access this action. * * @return mixed An array or a string describing the credentials the user must have to access this action */ public function getCredential() { $credentials = parent::getCredential(); if (!dmConfig::get('site_active')) { $credentials = (array) $credentials; $credentials[] = 'site_view'; } return $credentials; }