MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / validUserInfo

Function validUserInfo

middleware/auth.go:17–26  ·  view source on GitHub ↗
(username string, role int)

Source from the content-addressed store, hash-verified

15)
16
17func validUserInfo(username string, role int) bool {
18 // check username is empty
19 if strings.TrimSpace(username) == "" {
20 return false
21 }
22 if !common.IsValidateRole(role) {
23 return false
24 }
25 return true
26}
27
28func authHelper(c *gin.Context, minRole int) {
29 session := sessions.Default(c)

Callers 1

authHelperFunction · 0.85

Calls 1

IsValidateRoleFunction · 0.92

Tested by

no test coverage detected