From af5947288db04af0f178eb5c27800cbcfadbe935 Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 27 Aug 2019 14:36:18 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8DTransferLegacyWeixins?= =?UTF-8?q?=E4=B8=AD=E5=88=A0=E9=99=A4=E8=A7=92=E8=89=B2=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/authz.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/authz.go b/business/jxstore/cms/authz.go index 945f2c249..2c0a422b2 100644 --- a/business/jxstore/cms/authz.go +++ b/business/jxstore/cms/authz.go @@ -115,7 +115,14 @@ func TransferLegacyWeixins(mobile string) (err error) { } } else { if mobile != "" { - api2.RoleMan.DeleteRole4User(user.GetID(), autils.NewRole(authz.StoreRoleBoss, v.JxStoreID)) + rList, err2 := api2.RoleMan.GetUserRoleList(user.GetID()) + if err = err2; err == nil { + for _, role := range rList { + if role.StoreID > 0 { + api2.RoleMan.DeleteRole4User(user.GetID(), autils.NewRole(authz.StoreRoleBoss, role.StoreID)) + } + } + } } } }