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
2 changed files with 3 additions and 7 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue