AlistGo/alist · error
user is disabled
Error message
user is disabled
What it means
Returned by authenticateToken (server/mcp/auth.go:82) when the JWT is valid, the user exists, the password has not changed, but the account's Disabled flag is set. The credentials authenticated correctly; the account is administratively blocked from using MCP.
Source
Thrown at server/mcp/auth.go:82
return guest, nil
}
// JWT token
claims, err := common.ParseToken(token)
if err != nil {
return nil, fmt.Errorf("invalid token: %w", err)
}
user, err := op.GetUserByName(claims.Username)
if err != nil {
return nil, fmt.Errorf("user not found: %w", err)
}
if claims.PwdTS != user.PwdTS {
return nil, fmt.Errorf("password has been changed")
}
if user.Disabled {
return nil, fmt.Errorf("user is disabled")
}
if err := loadRoles(user); err != nil {
return nil, err
}
return user, nil
}
func loadRoles(user *model.User) error {
if len(user.Role) > 0 {
roles, err := op.GetRolesByUserID(user.ID)
if err != nil {
return fmt.Errorf("failed to load roles: %w", err)
}
user.RolesDetail = roles
}
return nil
}View on GitHub (pinned to 843d9dc814)
Solutions
- Re-enable the account in the admin panel if access should continue
- Replace the MCP configuration with a token for an active account
- Treat this as terminal for the token — retrying will not help
Defensive patterns
Strategy: fallback
Try / catch
if err != nil && strings.Contains(err.Error(), "user is disabled") { stopAndReport("account suspended") } // do not retry Prevention
- Migrate disabled accounts' automation to a new account before suspension
- Treat this error as terminal, not transient
When it happens
Trigger: Admin disables a user in the users panel; the disabled user's MCP client keeps sending its (still cryptographically valid) token.
Common situations: Suspension of an account during an incident; test accounts disabled at the end of a sprint while CI still holds their tokens.
Related errors
- user not found: %w
- failed to get admin: %w
- failed to get guest: %w
- guest user is disabled
- invalid token: %w
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/978d43fae7a96f54.
Report an issue: GitHub.