Skip to content

Mullen_User Profile Management#184

Open
jfm56 wants to merge 69 commits intokaw393939:mainfrom
jfm56:main
Open

Mullen_User Profile Management#184
jfm56 wants to merge 69 commits intokaw393939:mainfrom
jfm56:main

Conversation

@jfm56
Copy link

@jfm56 jfm56 commented May 10, 2025

No description provided.

James Mullen added 30 commits April 26, 2025 11:49
-updated docker tag
…d enhance security

- Switched build and runtime images to python:3.12-slim-bookworm
- Removed unnecessary apt-get upgrade and libc-bin installation
- Created non-root user using Debian best practices (adduser/addgroup)
- Split ENTRYPOINT and CMD for better container override flexibility
- Reduced final image size and minimized potential security vulnerabilities
…in fixture

- Added Faker unique handling to users_with_same_role_50_users fixture
- Cleared Faker's unique generator between runs to avoid collisions
- Ensured generated users have unique nicknames and emails
- Fixed IntegrityError (duplicate key violation) during test setup
- Confirmed pagination tests now pass
…nAPI docs; chore(docker): optimize Dockerfile for faster builds, security, and smaller image
- Default to SQLite in CI to avoid real database connection during tests
- Use PostgreSQL for Docker deployments
- Removed unnecessary PostgreSQL components for environments that don't need them
- Ensured DATABASE_URL switches correctly based on environment
jfm56 added 30 commits April 28, 2025 22:36
… configuration

- Fixed email verification flow by flushing session before sending emails (ensures user.id is available in token link)
- Updated email_service to use correct verification URL structure
- Integrated logging.conf for better visibility (INFO/DEBUG level support)
- Connected logging config to app startup via logging.config
- Updated .gitignore and .dockerignore to exclude log files
… and expected tokens for better traceability
Added detailed logs inside verify_email_with_token() to trace email verification steps.

Now logging user lookup, token comparison, and commit success/failure.

Helps diagnose why email_verified was not updating after clicking verification links.

Prepared for easier troubleshooting by showing exact mismatches and session issues.

Removed duplicate logger key.
…deprecated 'app' parameter

Replaced deprecated AsyncClient(app=app) usage with AsyncClient(transport=ASGITransport(app=app))
to ensure compatibility with httpx >=0.24.0. This resolves setup errors in API tests using pytest.
- Added detailed logging to the /verify-email route to track verification attempts, user lookup, and results.
- Improved error handling and response clarity.
- Ensured logs record both success and failure scenarios for easier debugging.
- Verified token and user state before updating verification status.
- Removed inline comment from `args` in fileHandler to avoid ConfigParser error
- Confirmed log output now writes to both console and 'logs/app.log'
- Updated logger levels and formatters for improved clarity
- Updated .env to include SERVER_BASE_URL with correct port
- Modified Settings class to correctly load server_base_url as a string
- Verified that email verification links now include http://localhost:8000
- Fix incorrect logger import in email_service.py
- Fix parameter name mismatch in send_verification_email method
- Improve register endpoint to check for existing emails before registration
- Ensure proper HTTP status code (400) is returned for duplicate emails
- Remove custom exception handlers to use FastAPI's default error handling

This commit fixes an issue where attempting to register with an existing
email address would result in a 500 Internal Server Error instead of a
proper 400 Bad Request response.
- Updated SMTP connection logic to properly handle mock emails
- Added Kafka topic initialization scripts for reliable topic creation
- Created start-app.sh for streamlined application startup
- Updated Dockerfile with necessary dependencies
- Improved documentation for Kafka event-driven architecture
- Fixed authentication token handling
…MTP username typo in .env for email notifications reliability
- Standardize all email endpoints to use path parameters instead of request bodies
- Fix email verification to work with browser GET requests
- Add dropdown menus for role selection in role upgrade endpoint
- Fix path parameter handling in email test endpoints
- Add missing get_user_service dependency
- Update test cases to match new parameter style
- Remove deprecated request models
- Update /emails/test/account-locked/{user_id} to set is_locked and failed_login_attempts in the database
- Commit and refresh user after status change
- Improves test endpoint realism and allows DB verification via pgAdmin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments