Commit Graph

12 Commits

Author SHA1 Message Date
Quality App System
d45dc1dab1 docs: Add comprehensive settings page analysis and improvements
- Add detailed settings page analysis report (settings.md)
- Document identified security vulnerabilities and code quality issues
- Provide prioritized improvement recommendations
- Document permission and access control issues
- Add testing checklist for validation
- Track modifications to settings.py, routes.py, and settings.html templates
2026-01-23 22:54:11 +02:00
Quality App System
64b67b2979 Implement database connection pooling with context manager pattern
- Added DBUtils PooledDB for intelligent connection pooling
- Created db_pool.py with lazy-initialized connection pool (max 20 connections)
- Added db_connection_context() context manager for safe connection handling
- Refactored all 19 database operations to use context manager pattern
- Ensures proper connection cleanup and exception handling
- Prevents connection exhaustion on POST requests
- Added logging configuration for debugging

Changes:
- py_app/app/db_pool.py: New connection pool manager
- py_app/app/logging_config.py: Centralized logging
- py_app/app/__init__.py: Updated to use connection pool
- py_app/app/routes.py: Refactored all DB operations to use context manager
- py_app/app/settings.py: Updated settings handlers
- py_app/requirements.txt: Added DBUtils dependency

This solves the connection timeout issues experienced with the fgscan page.
2026-01-22 22:07:06 +02:00
Quality App Developer
07614cf0bb Fix: Resolve newly created users unable to login - Add modules column support to user creation and login flow
Changes:
1. Fixed create_user_handler to properly initialize modules JSON for new users
2. Fixed edit_user_handler to manage module assignments instead of non-existent email field
3. Updated settings_handler to select modules column instead of email from users table
4. Added validate_and_repair_user_modules function in setup_complete_database.py to ensure all users have correct module assignments
5. Added create_app_license function to create development license file during database setup
6. Added ensure_app_license function to docker-entrypoint.sh for license creation on container startup
7. Added user modules validation on Flask app startup to repair any malformed modules
8. License file is automatically created with 1-year validity on deployment

This ensures:
- New users created via UI get proper module assignments
- Existing users are validated/repaired on app startup
- Non-superadmin users can login after license check passes
- All deployments have a valid development license by default
2026-01-09 13:45:08 +02:00
Quality App Developer
a8824d6f69 updated code 2025-12-25 22:45:22 +02:00
ske087
0d98c527c6 Fix config file parsing and improve backup/restore functionality
- Fix external_server.conf parsing to skip comment lines and empty lines
- Update routes.py get_db_connection() to handle comments
- Update settings.py get_external_db_connection() to handle comments
- Improve restore_backup() to use mariadb command instead of Python parsing
- Remove SQLite database creation (MariaDB only)
- Add environment detection for dump command (mariadb-dump vs mysqldump)
- Add conditional SSL flag based on Docker environment
- Fix database restore to handle MariaDB sandbox mode comments
2025-11-13 03:59:27 +02:00
Quality System Admin
9c19379810 updated backups solution 2025-11-03 22:18:56 +02:00
Quality System Admin
1ade0b5681 updated documentation folder 2025-11-03 21:17:10 +02:00
957c8eca4d moved to test environment 2025-10-05 14:32:47 -04:00
8a7aa193dc updated permissions 2025-09-14 21:26:29 +03:00
9d80252c14 updated roles ant permissions 2025-09-12 22:14:51 +03:00
4597595db4 updated creation of the database for users 2025-09-12 21:24:22 +03:00
9fc32adb23 Role management, login logic, and debug improvements. MariaDB login now uses correct syntax. 2025-09-11 22:30:52 +03:00