Commit Graph

7 Commits (367a64b59d47f617be89429490a314c6746717ed)

Author SHA1 Message Date
Talha Ahmed 367a64b59d Audit trail: record who uploads, processes, exports, deletes; admin-only log view
Deploy to S3 / deploy (push) Successful in 23s Details
Every business action now lands in a new append-only audit_log table with the
verified signed-in identity: logins, closing create/delete/reopen, file upload
(incl. replacements) and delete, processing runs, export generation and
downloads. Rows carry no FK so history survives a closing's deletion.

Admins (new users.is_admin flag, granted via `manage.py set-admin <username>`)
can read it at /api/audit and in a new Audit Log page in the sidebar; everyone
else gets 403 and no nav entry. login/me responses now carry is_admin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-01 21:01:58 +05:00
Talha Ahmed 2aed450f4c Password updates via emailed 6-digit code
New flow (active once AR_SMTP_* is configured; hidden otherwise):
- POST /api/auth/request-code emails a code to the account address
  (usernames are emails). HMAC-stored, 10-min expiry, single-use,
  5-attempt lockout, 60s resend throttle, no user enumeration.
- POST /api/auth/reset-password sets the new password with the code —
  works signed-in (Settings) and from the login screen (Forgot
  password?), so users can self-recover without the admin.
- Mailer: stdlib smtplib (STARTTLS/SSL, certifi CA bundle); SMTP
  settings documented in .env templates.
- Settings switches to the code flow when email is on; the
  current-password form remains the fallback.

Note: CRAI_Report was checked as the reference for code-sending — it
has no email/OTP functionality, so this is a fresh implementation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 19:35:07 +05:00
sheheryarsoomro12 bacd13c8b5 New 2026-08-04 11:41:50 +05:00
sheheryarsoomro12 1fe6487681 Merge origin/main into new-changes.
Resolve models.py conflict by keeping session controls/payout fields and MySQL column lengths.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 12:26:31 +05:00
sheheryarsoomro12 b795d51aa7 Enhance API functionality and session management 2026-08-03 11:38:48 +05:00
bahawal.baloch 2135dc873c Implement MySQL support in AR aging app. Update README with configuration instructions, modify requirements for PyMySQL and dotenv, and refactor database setup to use MySQL. Adjust models and queries for compatibility with MySQL, including column size specifications. Enhance Vite config for API proxying. 2026-07-29 18:52:37 +05:00
sheheryarsoomro12 bf0cdc14c3 Initial commit: AR aging app with root gitignore.
Ignore financial workbooks, OS junk, and build artifacts; track app source and project skills.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 18:07:21 +05:00