CC-3536 : Work out ACL with library on NowPlaying when it's a guest User

This commit is contained in:
Naomi Aro 2012-03-28 18:43:44 +02:00
parent 1e9348f27f
commit d12ef1c7a2
8 changed files with 72 additions and 39 deletions

View file

@ -47,7 +47,10 @@ class Application_Model_Scheduler {
throw new Exception("Invalid Request.");
}
$schedIds = array_keys($schedInfo);
$schedIds = array();
if (isset($schedInfo)) {
$schedIds = array_keys($schedInfo);
}
$schedItems = CcScheduleQuery::create()->findPKs($schedIds, $this->con);
$instanceIds = array_keys($instanceInfo);
$showInstances = CcShowInstancesQuery::create()->findPKs($instanceIds, $this->con);

View file

@ -26,6 +26,10 @@ class Application_Model_User {
public function getId() {
return $this->_userInstance->getDbId();
}
public function isGuest() {
return $this->getType() == UTYPE_GUEST;
}
public function isHost($showId) {
return $this->isUserType(UTYPE_HOST, $showId);