Merge branch 'cc-5709-airtime-analyzer-buy-now-saas' into saas
Conflicts: airtime_mvc/application/controllers/LoginController.php
This commit is contained in:
commit
35e98e468d
36 changed files with 2083 additions and 105 deletions
|
@ -1038,7 +1038,7 @@ SQL;
|
|||
{
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||
$isAdminOrPM = $user->isUserType(array(UTYPE_SUPERADMIN, UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||
|
||||
// get only the files from the blocks
|
||||
// we are about to delete
|
||||
|
|
|
@ -35,4 +35,11 @@ class Cache
|
|||
//return apc_fetch($cacheKey);
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function clear()
|
||||
{
|
||||
// Disabled on SaaS
|
||||
// apc_clear_cache('user');
|
||||
// apc_clear_cache();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -987,7 +987,7 @@ SQL;
|
|||
{
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||
$isAdminOrPM = $user->isUserType(array(UTYPE_SUPERADMIN, UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||
|
||||
// get only the files from the playlists
|
||||
// we are about to delete
|
||||
|
|
|
@ -6,7 +6,7 @@ class Application_Model_Preference
|
|||
{
|
||||
|
||||
private static function getUserId()
|
||||
{
|
||||
{
|
||||
//pass in true so the check is made with the autoloader
|
||||
//we need this check because saas calls this function from outside Zend
|
||||
if (!class_exists("Zend_Auth", true) || !Zend_Auth::getInstance()->hasIdentity()) {
|
||||
|
|
|
@ -379,7 +379,7 @@ SQL;
|
|||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
$isAdminOrPM = $user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||
$isAdminOrPM = $user->isUserType(array(UTYPE_SUPERADMIN, UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER));
|
||||
if (!$isAdminOrPM && $this->getFileOwnerId() != $user->getId()) {
|
||||
throw new FileNoPermissionException();
|
||||
}
|
||||
|
|
|
@ -49,14 +49,20 @@ class Application_Model_User
|
|||
{
|
||||
return $this->isUserType(UTYPE_ADMIN);
|
||||
}
|
||||
|
||||
|
||||
public function isSuperAdmin()
|
||||
{
|
||||
return $this->isUserType(UTYPE_SUPERADMIN);
|
||||
}
|
||||
|
||||
public function canSchedule($p_showId)
|
||||
{
|
||||
$type = $this->getType();
|
||||
$result = false;
|
||||
|
||||
if ($type === UTYPE_ADMIN ||
|
||||
$type === UTYPE_PROGRAM_MANAGER ||
|
||||
if ($this->isAdmin() ||
|
||||
$this->isSuperAdmin() ||
|
||||
$this->isPM() ||
|
||||
self::isHostOfShow($p_showId)) {
|
||||
$result = true;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class CcSubjs extends BaseCcSubjs {
|
|||
|
||||
public function isAdminOrPM()
|
||||
{
|
||||
return $this->type === UTYPE_ADMIN || $this->type === UTYPE_PROGRAM_MANAGER;
|
||||
return $this->type === UTYPE_SUPERADMIN || $this->type === UTYPE_ADMIN || $this->type === UTYPE_PROGRAM_MANAGER;
|
||||
}
|
||||
|
||||
public function isHostOfShow($showId)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue