isGeneralSettingsAdminEnabled() public static method

public static isGeneralSettingsAdminEnabled ( )
Example #1
0
 protected function init()
 {
     $this->title = Piwik::translate('CoreAdminHome_UpdateSettings');
     $isWritable = Piwik::hasUserSuperUserAccess() && CoreAdminController::isGeneralSettingsAdminEnabled();
     $this->releaseChannel = $this->createReleaseChannel();
     $this->releaseChannel->setIsWritableByCurrentUser($isWritable);
     $isWritable = $isWritable && PluginUpdateCommunication::canBeEnabled();
     $this->sendPluginUpdateEmail = $this->createSendPluginUpdateEmail();
     $this->sendPluginUpdateEmail->setIsWritableByCurrentUser($isWritable);
 }
Example #2
0
File: API.php Project: piwik/piwik
 /**
  * @internal
  */
 public function setTrustedHosts($trustedHosts)
 {
     Piwik::checkUserHasSuperUserAccess();
     if (!Controller::isGeneralSettingsAdminEnabled()) {
         throw new Exception('General settings admin is ont enabled');
     }
     if (!empty($trustedHosts)) {
         Url::saveTrustedHostnameInConfig($trustedHosts);
         Config::getInstance()->forceSave();
     }
     return true;
 }
Example #3
0
 public static function isBrowserTriggerEnabled()
 {
     $uiSettingIsEnabled = Controller::isGeneralSettingsAdminEnabled();
     if ($uiSettingIsEnabled) {
         $browserArchivingEnabled = Option::get(self::OPTION_BROWSER_TRIGGER_ARCHIVING);
         if ($browserArchivingEnabled !== false) {
             return (bool) $browserArchivingEnabled;
         }
     }
     return (bool) Config::getInstance()->General['enable_browser_archiving_triggering'];
 }