This commit is contained in:
邹宗楠
2022-04-13 10:12:17 +08:00
parent 1ad33dee35
commit ef207a80ac
2 changed files with 16 additions and 18 deletions

View File

@@ -382,14 +382,14 @@ func GetUserStoresResultMap(userID string) (resultMap map[int]int, err error) {
func IsRoled(ctx *jxcontext.Context) bool {
if ctx.GetUserName() != "jxadmin" {
if user, err := dao.GetUserByID(dao.GetDB(), "user_id", ctx.GetUserID()); err == nil {
//if user.Type&model.UserTypeRole != 0 {
// return true
//}
if user.Type == 23 {
return false
} else {
if user.Type&model.UserTypeRole != 0 {
return true
}
//if user.Type == 23 {
// return false
//} else {
// return true
//}
}
}
return false