检查点:保留账号分组隔离实现,继续权限复审
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-25 21:46:42 +08:00
1 parent 9be7a6f990
commit fcbcf91d66
23 files changed
+811 -81

No files matched your search

+13 -13
View File
@@ -15,19 +15,19 @@ import (
)
const (
UsernamePrefix = "notify:"
UsernamePrefix = "notify:"
DefaultMinuteLimit = 10
DefaultDayLimit = 100
MaxRecipients = 10
MaxMessageBytes = 1 << 20
DefaultDayLimit = 100
MaxRecipients = 10
MaxMessageBytes = 1 << 20
)
var (
ErrDenied = errors.New("notification authorization denied")
ErrConflict = errors.New("notification authorization changed")
ErrQuota = errors.New("notification quota exceeded")
ErrDenied = errors.New("notification authorization denied")
ErrConflict = errors.New("notification authorization changed")
ErrQuota = errors.New("notification quota exceeded")
ErrUnavailable = errors.New("notification authorization unavailable")
ErrLimits = errors.New("invalid notification limits")
ErrLimits = errors.New("invalid notification limits")
)
func IsUsername(username string) bool {
@@ -118,11 +118,11 @@ func Rotate(engine *xorm.Engine, user models.User, expected int) (string, error)
}
type Grant struct {
engine *xorm.Engine
userID int
version int
hash string
sessionVersion int
engine *xorm.Engine
userID int
version int
hash string
sessionVersion int
securityVersion int
}