- 角色管理初版
This commit is contained in:
@@ -3,12 +3,15 @@ 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/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/model/legacymodel"
|
||||
"git.rosy.net.cn/jx-callback/globals/api2"
|
||||
)
|
||||
|
||||
// todo 是否需要将Store.MarketManPhone与OperatorPhone成角色?
|
||||
|
||||
func TransferLegacyWeixins() (err error) {
|
||||
const remark4Transfer = "transfer"
|
||||
// DELETE t1
|
||||
@@ -88,8 +91,8 @@ func TransferLegacyWeixins() (err error) {
|
||||
},
|
||||
})
|
||||
}
|
||||
if v.JxStoreID > 0 {
|
||||
api2.RoleMan.AddStoreRole4User(user.GetID(), v.JxStoreID)
|
||||
if v.JxStoreID > 0 && user.Type&model.UserTypeOperator == 0 { // 运营就不加到门店老板组里了
|
||||
api2.RoleMan.AddRole4User(user.GetID(), authz.NewRole(authz.StoreRoleBoss, v.JxStoreID))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user