mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-26 01:15:52 +03:00
[PR #349] [MERGED] Harden subscription endpoint authorization and add production-readiness review #316
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#316
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AJaySi/ALwrity/pull/349
Author: @AJaySi
Created: 2/11/2026
Status: ✅ Merged
Merged: 2/11/2026
Merged by: @AJaySi
Base:
main← Head:codex/review-subscription-codebase-for-readiness📝 Commits (1)
b14ee71Harden subscription endpoint auth and add production readiness review📊 Changes
4 files changed (+106 additions, -2 deletions)
View changed files
📝
backend/api/subscription/routes/alerts.py(+10 -2)📝
backend/api/subscription/routes/dashboard.py(+4 -0)📝
backend/api/subscription/routes/usage.py(+2 -0)➕
backend/docs/subscription-production-readiness-review.md(+90 -0)📄 Description
Motivation
Description
current_user: Dict[str, Any] = Depends(get_current_user)and enforcedverify_user_access(user_id, current_user)on user-scoped endpointsGET /usage/{user_id}/trends,GET /dashboard/{user_id}, andGET /alerts/{user_id}to prevent cross-user access.verify_user_access(str(alert.user_id), current_user)inPOST /alerts/{alert_id}/mark-readbefore mutating the alert.backend/docs/subscription-production-readiness-review.mddocumenting findings, high-priority follow-ups (caching, billing-period accuracy, decimal money types), and rollout recommendations.Testing
python -m compileall backend/api/subscription/routes/alerts.py backend/api/subscription/routes/usage.py backend/api/subscription/routes/dashboard.py, which completed successfully.Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.