google-labs-jules[bot]
cee6d6d4e1
Fix test mocking of celery task request
...
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-03-23 14:40:36 +00:00
copilot-swe-agent[bot]
18c49c6b2d
feat(config): add LOG_LEVEL setting and configure root logging at startup
...
- Add `log_level` setting to config.py (default: INFO, env: LOG_LEVEL)
- Configure Python root logger in main.py with standard precedence:
LOG_LEVEL explicit > DEBUG=true implies DEBUG > default INFO
- Add timestamp to log format for production readability
- Suppress noisy third-party loggers at DEBUG level
- Add comprehensive debug logging to all auth functions
- Add LOG_LEVEL/DEBUG to .env.demo and ConfigurationGuide.md
- Add tests for logging config and auth debug output
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-03-16 09:33:50 +00:00
copilot-swe-agent[bot]
c31b72810e
fix(merge): resolve tests/test_auth.py conflict keeping all tests from both branches
...
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-03-08 11:11:21 +00:00
copilot-swe-agent[bot]
7db26f4a31
fix(auth): pass request as keyword arg in require_login to fix path-param endpoints
...
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-03-08 10:05:50 +00:00
copilot-swe-agent[bot]
b95f552ed2
fix(auth): prevent None==None admin credential bypass creating phantom admin user
...
When ADMIN_USERNAME/ADMIN_PASSWORD env vars are not configured, settings
values are None. Python's `None == None` evaluates to True, so any login
request omitting those form fields was authenticated as admin — creating a
phantom 'None@local.docuelevate ' profile with admin rights and business plan.
Guard the admin credential check to require both values to be truthy
(non-None, non-empty) before attempting the comparison.
Adds three regression tests covering: both None, both empty-string, and
only password None scenarios.
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-03-07 21:36:31 +00:00
copilot-swe-agent[bot]
52e3852129
feat(auth): add local user signup, email verification, and Stripe billing
...
- Add LocalUser model with bcrypt password hashing, email verification
tokens, and password reset tokens
- Add ALLOW_LOCAL_SIGNUP config flag (requires SMTP to be configured)
- Add Stripe billing config fields (STRIPE_SECRET_KEY, etc.)
- Add stripe_customer_id to UserProfile and stripe_price_id_monthly/
stripe_price_id_yearly to SubscriptionPlan
- Create migration 018_add_local_users_and_billing
- Add app/utils/local_auth.py: hash_password, verify_password,
generate_token, is_token_expired, send_verification_email,
send_password_reset_email, build_session_user
- Add app/api/local_auth.py: signup, email verification, password reset
endpoints plus signup/verify-email-sent/reset-password page routes
- Add app/api/billing.py: Stripe Checkout, Customer Portal, and webhook
endpoints; syncs subscription tier from webhook events
- Update auth() to check LocalUser table before admin credentials fallback
- Update login() to pass allow_signup context variable to template
- Add signup.html, verify_email_sent.html, password_reset_form.html,
billing_success.html templates (Alpine.js, Tailwind, WCAG 2.1 AA)
- Update login.html to show 'Create account' link when signup enabled
- Update pricing.html CTA buttons to use Stripe Checkout for paid tiers
- Add docs/BillingSetup.md with setup guide, webhook config, compliance
- Add tests/test_local_auth.py (42 tests) and tests/test_billing.py
(31 tests); all 106 tests in the modified test suite pass
- Add stripe>=7.0.0,<15.0.0 to requirements.txt
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-07 13:15:15 +00:00
copilot-swe-agent[bot]
dd207eef9b
fix: pricing page toggle and user auto-creation on OAuth login
...
- Fix monthly/annual price toggle by moving x-data scope to outer div
- Auto-create UserProfile in DB on first Authentik OAuth login
- Update and expand tests for oauth_callback and _ensure_user_profile
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-03-07 10:52:26 +00:00
copilot-swe-agent[bot]
e24f83fdd0
fix: resolve 48 lint errors in test files
...
- Remove whitespace from 22 blank lines (W293)
- Remove 6 unused imports (F401): os, Mock, MagicMock, Path
- Add missing imports for 12 test functions (F821): sanitize_filename, extract_remote_path, MagicMock
- Fix 1 unsorted import block (I001)
All ruff checks now pass successfully.
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-02-15 10:24:48 +00:00
copilot-swe-agent[bot]
b2badd0429
style: fix import ordering in test_auth.py
...
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-02-13 23:26:53 +00:00
copilot-swe-agent[bot]
4221abd991
feat(tests): increase test coverage for dropbox.py and auth.py to >90%
...
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-02-13 23:23:35 +00:00
copilot-swe-agent[bot]
7c4d6fd025
fix: extract hard-coded test credentials to module-level constants (S2068)
...
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-02-11 16:50:37 +00:00
copilot-swe-agent[bot]
42cac76c0e
style: format test files with black and isort, remove unused imports
...
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-02-09 21:19:41 +00:00
copilot-swe-agent[bot]
acb8951dd9
test: expand auth and encryption test coverage with 299 new test lines
...
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-02-09 21:16:55 +00:00
copilot-swe-agent[bot]
c3bfb26c73
test: add comprehensive tests across modules to increase coverage above 60%
...
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com >
2026-02-09 11:57:09 +00:00