/** * * @param $path * @param $originDomain口 * @param $chooserAppKey * @param $session */ public function LinkCreateBiz($path, $originDomain, $chooserAppKey, $session) { parent::MiniBiz(); $arr = explode('/', $path); $isRoot = false; $isMine = false; if (count($arr) == 3) { $isRoot = true; } $fileOwnerId = $arr[1]; $currentUser = $this->user; $currentUserId = $currentUser['user_id']; if ($fileOwnerId == $currentUserId) { $isMine = true; } if ($isRoot && !$isMine) { //如果是在根目录下且不是自己的目录 则后台控制不准取消共享 throw new MFileopsException(Yii::t('api', 'Internal Server Error'), MConst::HTTP_CODE_409); } $this->originDomain = $originDomain; $this->appKey = $chooserAppKey; $this->session = $session; $path = MiniUtil::joinPath($path); $this->file = MiniFile::getInstance()->getByPath($path); }
/** * @param $key */ public function LinkTransferBiz($key) { parent::MiniBiz(); $this->key = $key; }