/** * @param $setting * @throws \Exception */ private function checkHasEnoughReadPermission(Setting $setting) { // When the request is a Tracker request, allow plugins to read settings if (SettingsServer::isTrackerApiRequest()) { return; } if (!$setting->isReadableByCurrentUser()) { $errorMsg = Piwik::translate('CoreAdminHome_PluginSettingReadNotAllowed', array($setting->getName(), $this->pluginName)); throw new \Exception($errorMsg); } }