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:
@@ -485,8 +485,8 @@ async def get_effective_access(
|
||||
EntityPermission.principal_id == role_id,
|
||||
)
|
||||
)
|
||||
# Guest permission — only if user_id is actually a guest_user_id
|
||||
# (Guest users have no groups/roles, only direct entity_permissions)
|
||||
# Guest permission — guests are now regular users with role=guest
|
||||
# (Guest users may have no groups/roles, only direct entity_permissions)
|
||||
principal_conditions.append(
|
||||
and_(
|
||||
EntityPermission.principal_type == "guest",
|
||||
|
||||
Reference in New Issue
Block a user