Exemple #1
0
 /**
  * Limit CMS page save
  *
  * @param Mage_Cms_Model_Page $model
  */
 public function cmsPageSaveBefore($model)
 {
     $originalStoreIds = $model->getResource()->lookupStoreIds($model->getId());
     if ($model->getId() && !$this->_role->hasStoreAccess($originalStoreIds)) {
         $this->_throwSave();
     }
     if (!$this->_role->hasExclusiveStoreAccess($originalStoreIds)) {
         $this->_throwSave();
     }
     $model->setData('stores', $this->_forceAssignToStore($this->_updateSavingStoreIds($model->getData('stores'), $originalStoreIds)));
 }