mirror of
https://github.com/suitenumerique/messages.git
synced 2026-09-27 12:14:55 +02:00
- Add condition in MailDomainAdminViewSet.get_queryset() to return all domains when user is both superuser and staff - Add comprehensive tests covering all user permission combinations: * superuser + staff: can see all domains * superuser only: cannot see all domains (empty list) * staff only: cannot see all domains (empty list) * staff with domain access: can only see accessible domains - Maintain existing behavior for regular users and domain admins This change ensures that superusers with staff privileges have full administrative access to all mail domains through the admin API, while maintaining proper access control for other user types.