Skip to content

Auth: Phase 1 — add User model, login/register/change-password, tests and fixes#3

Merged
diamond2016 merged 8 commits into
mainfrom
feat/auth-phase1-save
Dec 5, 2025
Merged

Auth: Phase 1 — add User model, login/register/change-password, tests and fixes#3
diamond2016 merged 8 commits into
mainfrom
feat/auth-phase1-save

Conversation

@diamond2016
Copy link
Copy Markdown
Owner

It is ok to merge I call for a code review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements Phase 1 of authentication for RadioChWeb, introducing user registration, login, logout, and password change functionality. The implementation uses Flask-Login for session management and passlib with pbkdf2_sha256 for password hashing.

Key Changes

  • Added complete authentication layer with User model, UserRepository, and AuthService
  • Created login, registration, and change-password routes with WTForms validation
  • Integrated authentication UI into the main navigation and created dedicated auth templates
  • Updated migration system to support pyway CLI with fallback to direct SQL execution

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
model/entity/user.py New User entity with Flask-Login integration and role-based fields
model/repository/user_repository.py Repository for User CRUD operations
service/auth_service.py Authentication service handling password hashing/verification and LoginManager initialization
route/auth_route.py Auth blueprint with login/register/logout/change-password endpoints
templates/user/*.html Login, registration, and change-password forms using Bootstrap
templates/index.html Updated navigation with conditional auth links and flash message display
migrate_db/migrations/V8_0__create_users_table.sql Migration creating users table
migrate_db/migrate.py Enhanced migration runner with pyway CLI support
tests/unit/test_auth_service.py Unit test for password hashing round-trip
tests/integration/test_auth_flow.py Integration test for complete register/login/logout flow
tests/integration/test_smoke_auth_pages.py Smoke test verifying auth pages render correctly
tests/unit/test_proposal_update.py Fixed to support both 'image' and 'image_url' form fields
route/proposal_route.py Updated to accept both 'image' and 'image_url' from forms
app.py Registered auth blueprint and initialized AuthService
requirements.txt Added passlib[bcrypt] dependency
ARCHITECTURE.md Updated documentation reflecting auth implementation and migration approach
specs/feature/feat-auth-layer.md Cleaned up formatting and corrected specification details

Comment thread specs/feature/feat-auth-layer.md Outdated
Comment thread tests/integration/test_smoke_auth_pages.py Outdated
Comment thread tests/integration/test_auth_flow.py Outdated
Comment thread model/entity/user.py Outdated
Comment thread tests/unit/test_proposal_update.py Outdated
Comment thread specs/feature/feat-auth-layer.md Outdated
Comment thread migrate_db/migrate.py Outdated
Comment thread route/auth_route.py Outdated
Comment thread route/auth_route.py Outdated
Comment thread route/auth_route.py Outdated
Copy link
Copy Markdown

Copilot AI commented Dec 5, 2025

@diamond2016 I've opened a new pull request, #4, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 4 commits December 5, 2025 07:59
@diamond2016 diamond2016 merged commit 3e3000d into main Dec 5, 2025
@diamond2016 diamond2016 deleted the feat/auth-phase1-save branch December 6, 2025 11:49
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.

3 participants