Revert "fix: updating metric library" - #109
Conversation
This reverts commit f663650. Co-authored-by: Cursor <cursoragent@cursor.com>
|
| Filename | Overview |
|---|---|
| app/api/v1/routes/auth.py | Removes gated-signup validation and inactive-organization checks from login, refresh, and organization switching, reopening account provisioning and disabled-tenant sessions. |
| app/core/auth/api_key.py | Returns organization-scoped principals without enforcing the organization鈥檚 persisted disabled state. |
| app/core/auth/local.py | Validates users and memberships but no longer rejects sessions scoped to disabled organizations. |
| app/models/database.py | Removes platform-admin, organization-active, metric-lifecycle, and Metrics Studio model mappings while upgraded databases can retain the corresponding state. |
| app/api/v1/routes/metrics.py | Removes draft creation/promotion behavior and lifecycle filtering, causing retained drafts to appear as ordinary metrics. |
| app/api/v1/routes/call_import_evaluations.py | Removes the explicit guard that prevented draft metrics from entering production call-import evaluations. |
| app/api/v1/routes/metric_studio.py | Deletes the Metrics Studio API as part of the feature revert. |
| app/api/v1/routes/platform_admin.py | Deletes platform-admin APIs, including organization disablement and signup-code management. |
| frontend/src/App.tsx | Removes Metrics Studio and platform-admin routes consistently with the deleted frontend pages. |
| frontend/src/lib/api.ts | Removes client contracts for the reverted Metrics Studio, platform-admin, gated-signup, and draft-lifecycle APIs. |
Comments Outside Diff (2)
-
app/core/auth/api_key.py, line 40-43 (link)Disabled organization access restored
If an upgraded database contains an organization previously marked inactive, valid API keys, local sessions, refresh tokens, memberships, and OIDC identities for that tenant can again produce principals or fresh tokens, restoring access to protected resources that organization disablement was intended to revoke. How this was verified: Every organization-active check and the mapped
Organization.is_activefield were removed, while the authentication paths still return organization-scoped principals or tokens. -
app/api/v1/routes/metrics.py, line 868-880 (link)Draft lifecycle boundary removed
If an upgraded database contains metrics created as drafts before this revert, this unfiltered query exposes them as ordinary metrics and the normal update path can enable them, causing unfinished definitions to enter production call-import evaluations even though the promotion API has been removed.
Reviews (1): Last reviewed commit: "Revert "fix: updating metric library"" | Re-trigger Greptile
| if settings.AUTH_GATED_SIGNUP_ENABLED: | ||
| reference_row = validate_reference_code_for_signup(db, payload.reference_code) | ||
|
|
||
| existing = db.query(User).filter(User.email == payload.email).first() |
There was a problem hiding this comment.
Gated signup enforcement removed
If an existing local-password deployment retains its gated-signup configuration, that setting is now ignored and POST /auth/signup provisions an administrator, organization, workspace, billing customer, and authenticated session without validating a reference code. How this was verified: The public signup route now proceeds directly from AUTH_LOCAL_ALLOW_SIGNUP to account creation, with no remaining reference-code enforcement in the repository.
This reverts commit f663650.
Co-authored-by: Cursor cursoragent@cursor.com