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

  1. Re-enable the account in the admin panel if access should continue
  2. Replace the MCP configuration with a token for an active account
  3. 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

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


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/978d43fae7a96f54. Report an issue: GitHub.