Esempio n. 1
0
 /**
  * Check ACL permissions
  *
  * @return boolean
  */
 public function checkACL()
 {
     $profile = $this->getProfile();
     $allowedForCurrentUser = \XLite\Core\Auth::getInstance()->isPermissionAllowed('manage users');
     if ($profile && $profile->isAdmin() && !\XLite\Core\Auth::getInstance()->isPermissionAllowed('manage admins')) {
         $allowedForCurrentUser = false;
     }
     return parent::checkACL() || $allowedForCurrentUser || $profile && $profile->getProfileId() == \XLite\Core\Auth::getInstance()->getProfile()->getProfileId();
 }
Esempio n. 2
0
 /**
  * Check ACL permissions
  *
  * @return boolean
  */
 public function checkACL()
 {
     $result = parent::checkACL();
     if (!$result) {
         foreach (static::getSearchCodePermissions() as $code => $permissions) {
             if (static::isSearchPermissionAllowed($permissions)) {
                 $result = true;
                 break;
             }
         }
     }
     return $result;
 }
Esempio n. 3
0
 /**
  * Check ACL permissions
  *
  * @return boolean
  */
 public function checkACL()
 {
     $result = parent::checkACL();
     if (!$result) {
         $dictionary = \XLite\Core\Request::getInstance()->dictionary;
         $permissions = $this->getDictionaryPermissions();
         if (!empty($permissions[$dictionary])) {
             foreach ($permissions[$dictionary] as $p) {
                 if (\XLite\Core\Auth::getInstance()->isPermissionAllowed($p)) {
                     $result = true;
                     break;
                 }
             }
         }
     }
     return $result;
 }
Esempio n. 4
0
File: Page.php Progetto: kingsj/core
 /**
  * Check ACL permissions
  *
  * @return boolean
  * @see    ____func_see____
  * @since  1.0.17
  */
 public function checkACL()
 {
     return parent::checkACL() || \XLite\Core\Auth::getInstance()->isPermissionAllowed('manage custom pages');
 }
Esempio n. 5
0
 /**
  * Check ACL permissions
  *
  * @return boolean
  */
 public function checkACL()
 {
     return parent::checkACL() || \XLite\Core\Auth::getInstance()->isAdmin();
 }
Esempio n. 6
0
 /**
  * Check ACL permissions
  *
  * @return boolean
  */
 public function checkACL()
 {
     return parent::checkACL() || \XLite\Core\Auth::getInstance()->isPermissionAllowed('manage users') || $this->getProfile() && $this->getProfile()->getProfileId() == \XLite\Core\Auth::getInstance()->getProfile()->getProfileId();
 }
Esempio n. 7
0
 /**
  * Check ACL permissions
  *
  * @return boolean
  */
 public function checkACL()
 {
     return parent::checkACL() && $this->getParcel();
 }
Esempio n. 8
0
 /**
  * Check ACL permissions
  *
  * @return boolean
  */
 public function checkACL()
 {
     return (parent::checkACL() || \XLite\Core\Auth::getInstance()->isPermissionAllowed('manage orders')) && $this->getShipment();
 }