示例#1
0
 public function beforeSave()
 {
     if (!$this->isNewRecord && $this->owner_id != Yii::app()->user->id) {
         throw404();
     }
     return parent::beforeSave();
 }