From 72b0f86cff1407ec81bd003765fd14608f037961 Mon Sep 17 00:00:00 2001 From: vilson <545522390@qq.com> Date: Sun, 23 Feb 2020 17:39:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: vilson <545522390@qq.com> --- application/common/Model/ProjectMember.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/common/Model/ProjectMember.php b/application/common/Model/ProjectMember.php index 68b5494..e18f2ee 100644 --- a/application/common/Model/ProjectMember.php +++ b/application/common/Model/ProjectMember.php @@ -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;