Merge branch '2.5.x' into saas
This commit is contained in:
commit
7e2cc65f32
3 changed files with 70 additions and 5 deletions
|
@ -88,11 +88,19 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
|
|||
|
||||
public static function deleteStreams($p_ids, $p_userId)
|
||||
{
|
||||
$leftOver = self::streamsNotOwnedByUser($p_ids, $p_userId);
|
||||
if (count($leftOver) == 0) {
|
||||
CcWebstreamQuery::create()->findPKs($p_ids)->delete();
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||
|
||||
if (!$isAdminOrPM) {
|
||||
$leftOver = self::streamsNotOwnedByUser($p_ids, $p_userId);
|
||||
if (count($leftOver) == 0) {
|
||||
CcWebstreamQuery::create()->findPKs($p_ids)->delete();
|
||||
} else {
|
||||
throw new WebstreamNoPermissionException;
|
||||
}
|
||||
} else {
|
||||
throw new WebstreamNoPermissionException;
|
||||
CcWebstreamQuery::create()->findPKs($p_ids)->delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1059,7 +1059,10 @@ var AIRTIME = (function(AIRTIME){
|
|||
"<i class='icon-white icon-ban-circle'></i></button></div>");
|
||||
}
|
||||
|
||||
$toolbar.append($menu);
|
||||
if (localStorage.getItem('user-type') != 'G') {
|
||||
$toolbar.append($menu);
|
||||
}
|
||||
|
||||
$menu = undefined;
|
||||
|
||||
$('#timeline-sa').click(function(){mod.selectAll();});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue