public function getCanAddPhoto() { return $this->status == Gallery::STATUS_PUBLIC || ($this->status == Gallery::STATUS_PRIVATE || $this->status == Gallery::STATUS_PERSONAL) && Yii::app()->user->getId() == $this->owner; }