+ 添加autils.NewStoreBossRole
This commit is contained in:
@@ -3,7 +3,6 @@ package cms
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/auth2"
|
||||
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/weixin"
|
||||
"git.rosy.net.cn/jx-callback/business/authz"
|
||||
"git.rosy.net.cn/jx-callback/business/authz/autils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
@@ -111,7 +110,7 @@ func TransferLegacyWeixins(mobile string) (err error) {
|
||||
}
|
||||
if v.JxStoreID > 0 { // 运营就不加到门店老板组里了
|
||||
if user.Type&model.UserTypeOperator == 0 {
|
||||
api2.RoleMan.AddRole4User(user.GetID(), autils.NewRole(authz.StoreRoleBoss, v.JxStoreID))
|
||||
api2.RoleMan.AddRole4User(user.GetID(), autils.NewStoreBossRole(v.JxStoreID))
|
||||
}
|
||||
} else {
|
||||
if mobile != "" {
|
||||
@@ -119,7 +118,7 @@ func TransferLegacyWeixins(mobile string) (err error) {
|
||||
if err = err2; err == nil {
|
||||
for _, role := range rList {
|
||||
if role.StoreID > 0 {
|
||||
api2.RoleMan.DeleteRole4User(user.GetID(), autils.NewRole(authz.StoreRoleBoss, role.StoreID))
|
||||
api2.RoleMan.DeleteRole4User(user.GetID(), autils.NewStoreBossRole(role.StoreID))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user