예제 #1
0
 /**
  * Check - is tracking file allowed for a user
  *
  * @param \XLite\Module\XC\CanadaPost\Model\Order\Parcel\Shipment\Tracking\File $storage File object 
  *
  * @return boolean
  */
 protected function checkCapostTrackingFileAccess(\XLite\Module\XC\CanadaPost\Model\Order\Parcel\Shipment\Tracking\File $storage)
 {
     $result = false;
     if (\XLite\Core\Auth::getInstance()->isLogged() && (\XLite\Core\Auth::getInstance()->isAdmin() || \XLite\Core\Auth::getInstance()->getProfile()->getProfileId() == $storage->getTrackingDetails()->getShipment()->getParcel()->getOrder()->getOrigProfile()->getProfileId())) {
         $result = true;
     }
     return $result;
 }
 /**
  * {@inheritDoc}
  */
 public function getTrackingDetails()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getTrackingDetails', array());
     return parent::getTrackingDetails();
 }