protected function init() { $this->userTrackingEnabled = $this->createUsersOptOutSetting(); if (!$this->systemSettings->canUserOptOut->getValue()) { // we show this setting only when a user can actually opt out $this->userTrackingEnabled->setIsWritableByCurrentUser(false); } }
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); }