CC-4094: Dashboard -> Source Info panel: DJ assigned to current show can turn off the Master Resouce but cannot disconnect it.
- fixed
This commit is contained in:
parent
b6f447a827
commit
54b6b12ec0
|
@ -25,9 +25,7 @@ class DashboardController extends Zend_Controller_Action
|
||||||
$user = new Application_Model_User($userInfo->id);
|
$user = new Application_Model_User($userInfo->id);
|
||||||
|
|
||||||
$show = Application_Model_Show::getCurrentShow();
|
$show = Application_Model_Show::getCurrentShow();
|
||||||
|
$show_id = isset($show[0]['id'])?$show[0]['id']:0;
|
||||||
$show_id = isset($show['id'])?$show['id']:0;
|
|
||||||
|
|
||||||
$source_connected = Application_Model_Preference::GetSourceStatus($sourcename);
|
$source_connected = Application_Model_Preference::GetSourceStatus($sourcename);
|
||||||
|
|
||||||
if ($user->canSchedule($show_id) && $source_connected) {
|
if ($user->canSchedule($show_id) && $source_connected) {
|
||||||
|
|
|
@ -35,7 +35,6 @@ class Application_Model_User
|
||||||
public function isHostOfShow($showId)
|
public function isHostOfShow($showId)
|
||||||
{
|
{
|
||||||
$userId = $this->_userInstance->getDbId();
|
$userId = $this->_userInstance->getDbId();
|
||||||
|
|
||||||
return CcShowHostsQuery::create()
|
return CcShowHostsQuery::create()
|
||||||
->filterByDbShow($showId)
|
->filterByDbShow($showId)
|
||||||
->filterByDbHost($userId)->count() > 0;
|
->filterByDbHost($userId)->count() > 0;
|
||||||
|
@ -63,10 +62,9 @@ class Application_Model_User
|
||||||
|
|
||||||
if ($type === UTYPE_ADMIN ||
|
if ($type === UTYPE_ADMIN ||
|
||||||
$type === UTYPE_PROGRAM_MANAGER ||
|
$type === UTYPE_PROGRAM_MANAGER ||
|
||||||
CcShowHostsQuery::create()->filterByDbShow($p_showId)->filterByDbHost($this->getId())->count() > 0) {
|
self::isHostOfShow($p_showId)) {
|
||||||
$result = true;
|
$result = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +208,7 @@ class Application_Model_User
|
||||||
$this->_userInstance->delete();
|
$this->_userInstance->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function getOwnedFiles()
|
public function getOwnedFiles()
|
||||||
{
|
{
|
||||||
$user = $this->_userInstance;
|
$user = $this->_userInstance;
|
||||||
// do we need a find call at the end here?
|
// do we need a find call at the end here?
|
||||||
|
|
Loading…
Reference in New Issue