This commit is contained in:
邹宗楠
2022-03-30 11:17:04 +08:00
parent 907b265ba7
commit 0de43fb815
2 changed files with 5 additions and 1 deletions

View File

@@ -419,7 +419,7 @@ 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 {
fmt.Println("user111111111111111", user.Type)
fmt.Println("用户type", user.Type)
if user.Type&model.UserTypeRole != 0 {
return true
}