Licensed features can now be granted or revoked per user instead of applying instance-wide. Resolution is layered: the instance license must include the feature, then a per-user override, an admin-set instance default and the built-in code default are consulted in that order. Time tracking is the first per-user toggleable feature; admin_panel and audit_logs stay instance-wide. New features opt in via the perUserToggleable map in pkg/license. - store per-user overrides in a json column on users, instance defaults in the new pro_feature_instance_defaults table - enforce the toggle in the v2 time-entries route gate and in the TimeEntry permission chokepoint for non-route callers - new admin v2 endpoints to manage instance defaults and per-user overrides - expose effective_pro_features on /api/v1/user; the frontend prefers it over /info's instance-wide list once the user is loaded - admin UI: per-user toggles on the user detail modal, instance defaults on the admin overview https://claude.ai/code/session_01AVt4FHWrUUhv5p6yn99pdp |
||
|---|---|---|
| .. | ||
| api | ||
| caldav | ||
| feeds | ||
| middleware | ||
| admin_gate.go | ||
| api_tokens.go | ||
| error_handler.go | ||
| feature_gate.go | ||
| healthcheck.go | ||
| metrics.go | ||
| rate_limit.go | ||
| resolve_project.go | ||
| routes.go | ||
| sentry_middleware.go | ||
| static.go | ||
| validation.go | ||