CC-4201: Playlist Builder -> Smart Playlist: DJ user can edit SP created by others in particular situation

-fixed
This commit is contained in:
denise 2012-08-09 18:24:22 -04:00
parent 321e6c6524
commit 10ea825536
3 changed files with 7 additions and 4 deletions

View File

@ -195,9 +195,9 @@ class PlaylistController extends Zend_Controller_Action
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
$user = new Application_Model_User($userInfo->id);
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
$this->view->obj = $obj;
if($isAdminOrPM || $obj->getCreatorId() == $userInfo->id){
$this->view->obj = $obj;
if($this->obj_sess->type == "block"){
$form = new Application_Form_SmartBlockCriteria();
$form->startForm($this->obj_sess->id);

View File

@ -12,9 +12,8 @@ if (isset($this->obj)) {
</a>
<?php endif; ?>
<button class="ui-button ui-state-default sp-button" type="button" id="save_button">Save</button>
<?php if (isset($this->obj)) : ?>
<button class="ui-button ui-state-default sp-button" type="button" id="save_button">Save</button>
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>
<input id="obj_lastMod" type="hidden" value="<?php echo $this->obj->getLastModified('U'); ?>"></input>
<input id='obj_type' type='hidden' value='playlist'></input>

View File

@ -12,7 +12,11 @@ if (isset($this->obj)) {
</a>
<?php endif; ?>
<?php echo $this->form->getElement('save_button');?>
<?php
if (isset($this->form)) {
echo $this->form->getElement('save_button');
}
?>
<?php if (isset($this->obj)) : ?>
<input id="obj_id" type="hidden" value="<?php echo $this->obj->getId(); ?>"></input>