This commit is contained in:
苏尹岚
2021-03-25 16:10:43 +08:00
parent c647fdb17e
commit 27aceae1d3
4 changed files with 33 additions and 12 deletions

View File

@@ -8,8 +8,6 @@ import (
"sync"
"time"
"git.rosy.net.cn/jx-callback/business/jxstore/permission"
"git.rosy.net.cn/jx-callback/business/partner/purchase/jd"
"git.rosy.net.cn/jx-callback/globals/api/apimanager"
@@ -571,13 +569,13 @@ func AddUsers4Role(ctx *jxcontext.Context, r *authz.RoleInfo, userIDList []strin
errList := errlist.New()
for _, v := range userIDList {
if permission.IsRoledByUserID(v) {
if storeIDsMap, err := permission.GetUserStoresResultMap(v); err == nil {
if storeIDsMap[r.StoreID] == 0 {
return fmt.Errorf("此用户没有该门店[%v]的权限,无法添加到分组", r.StoreID)
}
}
}
// if permission.IsRoledByUserID(v) {
// if storeIDsMap, err := permission.GetUserStoresResultMap(v); err == nil {
// if storeIDsMap[r.StoreID] == 0 {
// return fmt.Errorf("此用户没有该门店[%v]的权限,无法添加到分组", r.StoreID)
// }
// }
// }
if err = checkUserType(v, model.UserTypeNonConsumer); err != nil {
return err