细节优化

Signed-off-by: vilson <545522390@qq.com>
This commit is contained in:
vilson 2020-02-23 17:39:54 +08:00
parent a61566d4d2
commit 72b0f86cff

View File

@ -55,6 +55,9 @@ class ProjectMember extends CommonModel
// throw new \Exception('该成员尚未加入项目', 1);
return true;
}
if ($hasJoined['is_owner']) {
throw new \Exception('不能移除创建者', 1);
}
$result = $hasJoined->delete();
Project::projectHook(getCurrentMember()['code'], $projectCode, 'removeMember', $memberCode);
return $result;