Commit Graph

8 Commits

Author SHA1 Message Date
Matthieu B
09b79b5e0d fix: handle legacy admin user when creating API keys (#1174)
When the legacy AdminUser (id="admin", a string) is logged in and tries
to create an API key, the string id was being passed to the Integer FK
column created_by_id on ApiKey, causing a DB type mismatch error. Resolve
the id by looking up the first AdminAccount row instead. Also adds a
try/except with session rollback around the DB write so failures surface
as a flash message rather than a 500.
2026-03-29 16:10:35 +02:00
Matthieu B
9b5aa0972a refactor: remove slop from media and new linting rules 2025-10-23 18:33:50 +02:00
Matthieu B
ddfde2fab9 fix: ensure API key uniqueness check only considers active keys and improve server deletion response handling 2025-10-08 14:40:53 +02:00
Matthieu B
48813a9f7c Update API key management UI and integrate CSRF protection 2025-08-13 21:48:48 +02:00
Matthieu B
1723e876b6 Refactor API models and invitation flow; add comprehensive tests
- Updated `InvitationCreateRequest` model to change `server_ids` from required to optional with improved description.
- Enhanced `library_model` to include `external_id`, `server_name`, and `enabled` fields.
- Modified `InvitationFlowManager` to prioritize new many-to-many relationship checks for invitations.
- Created a new migration file to merge branches related to API key and foreign key improvements.
- Added comprehensive tests for API endpoints, including status, users, invitations, libraries, servers, and API key management.
- Implemented error handling tests for malformed JSON and inactive API keys.
2025-08-13 20:58:11 +02:00
Tomat0r
8eddbf4c20 Update app/blueprints/api_keys/routes.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-29 17:33:06 +02:00
copilot-swe-agent[bot]
1b1159e0f3 Fix API key deletion UI glitch and improve API endpoint functionality
Co-authored-by: Tomat0r <68383702+Tomat0r@users.noreply.github.com>
2025-07-28 13:06:36 +00:00
copilot-swe-agent[bot]
60cb5d8972 Implement comprehensive API system with key management
Co-authored-by: Tomat0r <68383702+Tomat0r@users.noreply.github.com>
2025-07-28 12:02:42 +00:00