Commit graph

6 commits

Author SHA1 Message Date
40b4bab4a8 checker: pause scheduling for paused or inactive users
All checks were successful
continuous-integration/drone/push Build is passing
Add a job-level gate to the scheduler. When set, the gate is consulted
on every popped job; if it returns false, the job is skipped and
re-enqueued for its next interval without invoking the engine.

A new UserGater builds such a gate from a user resolver and an
inactivity threshold:

  - users with UserQuota.SchedulingPaused are always blocked (admin
    kill switch);
  - users whose LastSeen is older than their effective inactivity
    horizon (UserQuota.InactivityPauseDays, falling back to a system
    default) are blocked until they log in again;
  - lookups are cached for 5 minutes so the scheduler hot path stays
    cheap, with an Invalidate hook for use on user updates.

This addresses the "free trial then forgotten" failure mode described
in the design notes.
2026-04-15 19:39:30 +07:00
3008e04a8c checkers: add API controllers, routes, and app wiring
Wire up the checker system to the HTTP layer:
- API controllers for checker operations, options, plans, and results
- Scoped routes at domain and service level
- Admin controllers for checker config and scheduler management
- App initialization: create usecases, start/stop scheduler
- Zone controller updated to include per-service check status
2026-04-15 19:30:14 +07:00
802d24c4b6 checkers: load external checker plugins from .so files
All checks were successful
continuous-integration/drone/push Build is passing
Scan -plugins-directory paths at startup, open each .so via plugin.Open,
look up the NewCheckerPlugin symbol from checker-sdk-go, and register the
returned definition and observation provider in the global checker
registries. A pluginLoader indirection keeps the door open for future
plugin kinds.
2026-04-15 19:30:13 +07:00
ee0e22adf5 chore: apply Go naming conventions and minor code improvements 2026-03-01 17:38:12 +07:00
0090054324 Add CAPTCHA support for login and registration
Integrates optional bot protection on the registration endpoint (always
required when a provider is configured) and the login endpoint (triggered
after N consecutive failures for the same IP or email address).

Supported providers: hCaptcha, reCAPTCHA v2, Cloudflare Turnstile.
2026-02-13 11:31:37 +07:00
356e733e76 Move config struct to model, avoid dependancy to storage 2025-05-28 22:00:02 +02:00