CC-2529: Create download file API key
-users who are authenticed via ZEND_AUTH can now preview files without using api-key
This commit is contained in:
parent
88bdb4840b
commit
1416274882
4 changed files with 5 additions and 8 deletions
|
@ -74,8 +74,9 @@ class ApiController extends Zend_Controller_Action
|
|||
$download = ("true" == $this->_getParam('download'));
|
||||
|
||||
$logger = Logging::getLogger();
|
||||
|
||||
if(!in_array($api_key, $CC_CONFIG["apiKey"]))
|
||||
|
||||
if(!in_array($api_key, $CC_CONFIG["apiKey"]) &&
|
||||
is_null(Zend_Auth::getInstance()->getStorage()->read()))
|
||||
{
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
print 'You are not allowed to access this resource.';
|
||||
|
|
|
@ -376,8 +376,7 @@ class Schedule {
|
|||
"currentShow"=>Show_DAL::GetCurrentShow($timeNow),
|
||||
"nextShow"=>Show_DAL::GetNextShows($timeNow, 1),
|
||||
"timezone"=> date("T"),
|
||||
"timezoneOffset"=> date("Z"),
|
||||
"apiKey"=>$CC_CONFIG['apiKey'][0]);
|
||||
"timezoneOffset"=> date("Z"));
|
||||
}
|
||||
|
||||
public static function GetLastScheduleItem($p_timeNow){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue