From a562499b835cd4bb553767bb04450ed32136fd5e Mon Sep 17 00:00:00 2001 From: Minho Date: Thu, 25 May 2017 18:20:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E6=AD=A2=E5=8F=98=E6=9B=B4=E8=B6=85?= =?UTF-8?q?=E7=BA=A7=E7=AE=A1=E7=90=86=E5=91=98=E7=9A=84=E6=9D=83=E9=99=90?= =?UTF-8?q?=E5=92=8C=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/manager.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/controllers/manager.go b/controllers/manager.go index 9f1eda5c..ff56efa9 100644 --- a/controllers/manager.go +++ b/controllers/manager.go @@ -152,6 +152,9 @@ func (c *ManagerController) UpdateMemberStatus() { if member.MemberId == c.Member.MemberId { c.JsonResult(6004,"不能变更自己的状态") } + if member.Role == conf.MemberSuperRole { + c.JsonResult(6005,"不能变更超级管理员的状态") + } member.Status = status if err := member.Update(); err != nil { @@ -185,6 +188,9 @@ func (c *ManagerController) ChangeMemberRole() { if member.MemberId == c.Member.MemberId { c.JsonResult(6004,"不能变更自己的权限") } + if member.Role == conf.MemberSuperRole { + c.JsonResult(6005,"不能变更超级管理员的权限") + } member.Role = role if err := member.Update(); err != nil {