Skip to content

Rc - #306

Merged
evilguy4000 merged 6 commits into
mainfrom
RC
Nov 28, 2025
Merged

Rc#306
evilguy4000 merged 6 commits into
mainfrom
RC

Conversation

@evilguy4000

Copy link
Copy Markdown
Collaborator

No description provided.

…se browser compatibility warnings

ServiceWorker was incorrectly treated as a required feature, causing browser compatibility warnings to appear on every page load/refresh when accessing the app over HTTP (common in Portainer setups without HTTPS).

Changes:

- Removed serviceWorker from required features check (it's a PWA enhancement, not core functionality)

- Only localStorage and fetch are now checked as truly required features

- Added debug logging for serviceWorker availability without showing user-facing warnings

- App now works normally over HTTP without serviceWorker, only missing optional PWA features
- Fix incorrect relationship name: Comment.user -> Comment.author
  The Comment model uses 'author' relationship, not 'user'

- Fix eager loading of dynamic relationships
  Remove invalid eager loading attempts for Task.activities and
  Task.time_entries, which are dynamic relationships (lazy='dynamic')
  and cannot be eager loaded with joinedload()

- Query dynamic relationships correctly
  Update task view route to properly query time_entries and activities
  using their dynamic relationship query objects, with proper eager
  loading of nested relationships (TimeEntry.user, TaskActivity.user)
  to prevent N+1 queries

Fixes issue where task detail view returned HTTP 500 error after
creating a new task.
Add support for four authentication modes via AUTH_METHOD environment variable:
- none: Username-only authentication (no password)
- local: Password authentication required (default)
- oidc: OIDC/Single Sign-On only
- both: OIDC + local password authentication

Key changes:
- Add password_hash column to users table (migration 068)
- Implement password storage and verification in User model
- Update login routes to handle all authentication modes
- Add conditional password fields in login templates
- Support password authentication in kiosk mode
- Allow password changes in user profile when enabled

Password authentication is now enabled by default for better security,
while remaining backward compatible with existing installations.
Users will be prompted to set passwords when required.

Fixes authentication bypass issue where users could access accounts
without passwords even after setting them.
Implement a configuration management system where settings changed via
WebUI take priority over .env values, while .env values are used as initial
startup values.

Changes:
- Update ConfigManager.get_setting() to check Settings model first, then
  environment variables, ensuring WebUI changes have highest priority
- Add Settings._initialize_from_env() method to initialize new Settings
  instances from .env file values on first creation
- Update Settings.get_settings() to automatically initialize from .env
  when creating a new Settings instance
- Add Settings initialization in create_app() to ensure .env values are
  loaded on application startup
- Add comprehensive test suite (test_config_priority.py) covering:
  * Settings priority over environment variables
  * .env values used as initial startup values
  * WebUI changes persisting and taking priority
  * Proper type handling for different setting types

This ensures that:
1. .env file values are used as initial configuration on first startup
2. Settings changed via WebUI are saved to database and take priority
3. Configuration priority order: Settings (DB) > .env > app config > defaults

Fixes configuration management workflow where users can set initial values
in .env but override them permanently via WebUI without modifying .env.
@evilguy4000
evilguy4000 merged commit 4659aa4 into main Nov 28, 2025
2 of 6 checks passed
@github-actions

Copy link
Copy Markdown

❌ CI Test Results

Overall Status: 2 test suite(s) failed

Test Results: 0/7 passed

Test Suites:

  • ❌ Smoke Tests: failure
  • ⏭️ Unit Tests: skipped
  • ⏭️ Integration Tests: skipped
  • ⏭️ Security Tests: skipped
  • ❌ Code Quality: failure
  • ⏭️ Docker Build: skipped
  • ⏭️ Full Test Suite: skipped

Commit: 383182f
Workflow: 19770513321

@github-actions

Copy link
Copy Markdown

Database Migration Validation

✅ Migration validation passed!

Completed checks:

  • ✅ Migration consistency validation (with schema drift warnings)
  • ✅ Rollback safety test
  • ✅ Data integrity verification

The database migrations are safe to apply. 🚀

📝 Note: Schema drift warnings indicate existing model/migration mismatches that existed before this PR. These should be addressed in a separate schema alignment PR.


This comment was automatically generated by the Migration Validation workflow.

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