Add station podcast privacy toggle

This commit is contained in:
Duncan Sommerville 2015-10-21 17:30:24 -04:00
parent 92ffa955c3
commit 6580c12ad3
12 changed files with 71 additions and 10 deletions

View file

@ -4,6 +4,12 @@ class FeedsController extends Zend_Controller_Action
{
public function stationRssAction()
{
if (Application_Model_Preference::getStationPodcastPrivacy()
&& $this->getRequest()->getParam("sharing_token") != Application_Model_Preference::getStationPodcastDownloadKey()) {
$this->getResponse()
->setHttpResponseCode(401);
return;
}
$this->view->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);