Commit Graph

42 Commits

Author SHA1 Message Date
Matthieu B
59e2cb8199 chore: merge main into ldap branch, resolve conflicts 2026-03-29 16:28:20 +02:00
Matthieu B
73c29458fe fix: resolve all test failures, linting errors, and type errors
- Fix 55 test failures caused by missing request contexts and incorrect
  session_transaction() usage across 8 test files
- Fix ruff import sorting errors and unused imports
- Fix 122 type errors: rename method override parameters to match base
  classes, add None guards for fetchone()/datetime, widen dict type
  annotations, add type: ignore for SQLAlchemy stub limitations
- Add [tool.ty.rules] config to suppress unsupported-base warnings
- Fix _ variable shadowing gettext in wizard routes
- Add noqa: ARG002 for unused method arguments required by base class
2026-03-29 16:20:23 +02:00
Matthieu B
0902f4ba93 feat(invites): streamline invite expiry handling and update UI for expiration display 2026-02-25 02:02:08 +01:00
Matthieu B
48890075f2 fix(invites): fall back to global expiry when per-server expiry is unset
When server rows exist but have no per-server expiry, the global
invitation.expires was ignored, causing expired invitations to be
treated as valid.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 13:18:16 +01:00
Matthieu B
ad7f07319d feat(invites): implement per-server expiry handling and update invite modal closes #1138 2026-02-23 12:33:29 +01:00
Erwan Leboucher
5bb51e0cf1 feat(ldap): add LDAP authentication and invitation integration 2025-12-27 17:14:17 +01:00
Matthieu B
ac36e793e1 refactor: improve code formatting and readability across multiple files 2025-12-09 14:12:17 +01:00
Matthieu B
d50e0011a9 Update app/services/invites.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-23 14:47:55 +00:00
Simon
237fe620be feat: Add 'Max Active Sessions' input to invite form 2025-11-21 23:49:50 +01:00
Matthieu B
6a3632ec66 refactor: update type hints for better clarity and consistency across multiple files 2025-10-23 19:49:58 +02:00
Matthieu B
9b5aa0972a refactor: remove slop from media and new linting rules 2025-10-23 18:33:50 +02:00
Matthieu B
6ab5e024db Revert "Merge pull request #925 from wizarrrr/chore/python-3.14-upgrade"
This reverts commit 35dde7c19a, reversing
changes made to c8cf9905ba.
2025-10-19 14:05:59 +02:00
Matthieu B
36227c762b refactor: Update type hints for user details methods and other functions for improved clarity 2025-10-18 17:42:26 +02:00
Matthieu B
319d4ab188 fix: restore allow_downloads and allow_live_tv fields to Invitation model
The recent migration removed these fields from User model (correctly) but they
were accidentally removed from the Invitation model definition as well. These
fields are required on invitations to specify what permissions to grant when
creating users on media servers.

Fixes TypeError: 'allow_downloads' is an invalid keyword argument for Invitation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 19:21:26 +02:00
Matthieu B
51b6a3e080 Refactor Dockerfile to exclude dev dependencies for production image; add pytest-playwright and related packages; update invitation handling and tests for improved functionality and performance 2025-08-17 18:18:21 +02:00
Matthieu B
4de1def5b6 Refactor invitation handling to mark invitations as used and sync users from media server 2025-08-14 23:28:59 +02:00
Matthieu B
b6e54adbe0 Enhance invitation flow by marking invitations as used and syncing users in background threads 2025-08-14 18:13:11 +02:00
Matthieu B
2422cb1702 Add many-to-many relationship between invitations and users with tracking for invitation usage 2025-08-14 15:38:31 +02:00
Matthieu B
cdbbb91bc7 Enhance user association logic in mark_server_used function to automatically infer user from invitation code and server 2025-08-14 11:04:12 +02:00
Matthieu B
d96e8b8ba2 fixes #766 and fixes #767 2025-08-12 18:00:29 +02:00
Matthieu B
c79a670393 fix: Use unique library IDs in frontend to prevent duplicate submissions
- Changed library checkboxes to use unique library.id instead of library.external_id
- Updated backend to handle library IDs instead of external IDs
- Added visual grouping by server name when multiple servers are selected
- Added helper text to clarify that libraries are grouped by server
- Kept deduplication logic in backend as safety measure

This prevents the UNIQUE constraint violation that occurred when multiple
servers had libraries with the same external_id (e.g., "Audiobooks")

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 19:51:33 +02:00
Matthieu B
36a1131c97 fix: Prevent duplicate library associations when creating invitations
- Add deduplication logic to prevent adding the same library ID multiple times
- This fixes the UNIQUE constraint violation error when multiple servers
  have libraries with the same external_id
- Uses set to track seen library IDs and only adds unique ones
- Maintains backward compatibility with existing code

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 19:44:38 +02:00
Matthieu B
3bd6a54e21 fix: Prevent UNIQUE constraint violation when creating invitations with libraries
- Clear existing library associations before adding new ones to prevent
  duplicate entries in the invite_library table
- This matches the existing logic for server associations and prevents
  the sqlite3.IntegrityError that users were experiencing
- All tests passing, maintains backward compatibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 19:41:59 +02:00
Matthieu B
653155ce3e fix invite logic 2025-07-18 14:08:57 +02:00
Matthieu B
d8cb5193c3 invitation workflow overall for more stability 2025-07-17 15:13:00 +02:00
Matthieu B
8393345fc6 fix invite creation 2025-07-15 23:23:26 +02:00
Matthieu B
f08e02386c fix and closes #708 2025-07-15 15:13:40 +02:00
Matthieu B
635430b2dc Merge branch 'main' into fix-invite 2025-07-15 12:59:52 +01:00
Matthieu B
7b8f64af7d Fix SQLAlchemy model constructors to accept keyword arguments
- Added __init__ constructors to all SQLAlchemy models
- Fixed pyright 'No parameter named' errors across the codebase
- Fixed various ruff linting issues (SIM108, E741, E402, SIM102, B904, SIM105)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 13:52:15 +02:00
snowfudge
c1ff2c313f fix: use universal column to create invite 2025-07-15 12:33:15 +07:00
Matthieu B
58b996ee18 fix library display 2025-07-08 18:33:55 +02:00
Matthieu B
add1aaf8f4 added selectable wizard bundles 2025-07-04 15:33:24 +02:00
Matthieu B
2ca6c22764 feat: Add multi-server invite support with Jellyfin integration
- Add support for inviting users to multiple media servers simultaneously
- Implement Jellyfin-specific invite options (Allow Downloads, Allow Live TV)
- Add server type detection and conditional UI rendering in invite form
- Create new database migration for Jellyfin server options
- Update invite service to handle multi-server invitations
- Add server-specific validation and error handling
- Enhance user management with server-specific permissions
- Update templates to show server-specific invite options
- Add middleware support for multi-server authentication
- Improve settings forms with server type-specific fields

Breaking changes:
- Invite form now requires server selection
- User permissions are now server-specific
- Database schema updated for multi-server support
2025-07-03 16:18:50 +02:00
Matthieu B
31598000ec Added multi-server invites 2025-06-30 15:50:32 +02:00
Matthieu B
dedf79be01 fix and closes #630 2025-06-17 18:23:05 +01:00
Matthieu B
772bc24fa6 Added multiple servers support and identity linking 2025-06-13 14:37:57 +01:00
vhsdream
085a14b60d Increase default generated CODESIZE; increase maximum custom codesize
- Raise CODESIZE from 6 to 10 to make bruteforcing more difficult
- Increase maximum allowed digits for admin-supplied invite code to 12
- Formatting fixes
2025-06-06 07:58:45 -04:00
mtthidoteu
d8bc533230 fix and close #536 2025-06-03 13:19:50 +01:00
Matthieu B
abc63bfb83 fix onboarding not being shown 2025-05-23 22:40:59 +01:00
Matthieu B
979245924b make code case insensitive closes #529 2025-05-23 14:23:55 +01:00
Matthieu B
944b9bbf6f make code case insensitive 2025-05-23 14:21:18 +01:00
Matthieu B
4889e25d31 Huge rewrite 2025-05-20 13:01:20 +01:00