refactor(cleanup): remove dead GuestUser/GuestInvitation code and fix test imports

Deleted:
- app/models/guest_user.py
- app/models/guest_invitation.py
- app/routes/guest_auth.py (was orphaned, not imported)
- tests/test_guest_auth.py (tested removed guest auth system)

Modified:
- app/models/__init__.py: removed stale GuestUser/GuestInvitation comments
- app/services/entity_permission_service.py: updated guest permission comment
- tests/test_permission_system_live.py: replaced GuestUser with User+UserTenant(role=guest),
  changed principal_type from "guest" to "user", switched guest test from
  /api/v1/guest/login to regular /api/v1/auth/login endpoint

Frontend: no guest components found, nothing to clean up.
Alembic migrations: historical migrations referencing guest_users/guest_invitations
  tables are left intact (they document DB history).
This commit is contained in:
Agent Zero
2026-08-06 11:46:00 +02:00
parent a0c7a80381
commit 8060505baa
7 changed files with 14 additions and 376 deletions
-2
View File
@@ -13,8 +13,6 @@ from app.models.contact_merge import ContactMergeHistory
from app.models.entity_permission import EntityPermission
from app.models.consumer_inbox import ConsumerInbox
from app.models.outbox_delivery import OutboxDelivery
# ⚠️ Guest-System umgebaut — Guests sind jetzt reguläre User mit role=guest
# GuestUser and GuestInvitation models removed — guests are now regular users
from app.models.entity_policy import EntityPolicy
from app.models.permission_template import PermissionTemplate
from app.models.permission_delegation import PermissionDelegation