check_base_auth.go 586 B

12345678910111213141516171819202122232425262728
  1. package middleware
  2. import (
  3. "github.com/gin-gonic/gin"
  4. )
  5. // CheckBaseAuth 基本权限校验
  6. func CheckBaseAuth() gin.HandlerFunc {
  7. return func(c *gin.Context) {
  8. //userInfo := user.GetInfoByClaims(c)
  9. //
  10. //ok, checkInfo, _, err := company.CheckBaseFiccPermission(userInfo.CompanyID, int(userInfo.UserID))
  11. //if err != nil {
  12. // resp.FailMsg("用户权限验证失败", "CheckBaseAuth-用户权限验证失败" + err.Error(), c)
  13. // c.Abort()
  14. // return
  15. //}
  16. //if !ok {
  17. // resp.AuthError(checkInfo, "暂无权限", c)
  18. // c.Abort()
  19. // return
  20. //}
  21. c.Next()
  22. }
  23. }