This commit is contained in:
苏尹岚
2021-03-15 13:50:36 +08:00
parent 8c526bc31f
commit 26de1f03de
2 changed files with 19 additions and 0 deletions

View File

@@ -413,3 +413,12 @@ func IsRoled(ctx *jxcontext.Context) bool {
}
return false
}
func IsRoledByUserID(userID string) bool {
if user, err := dao.GetUserByID(dao.GetDB(), "user_id", userID); err == nil {
if user.Type&model.UserTypeRole != 0 {
return true
}
}
return false
}