Skip to content

Fix managed roles and reserved groups bugs in Discord Service and more

This MR contains the following main changes:

  • Fixes: "Existing members with Nitro Boosts applied can not authenticate" (#1334 (closed))
  • Fixes: "Discord roles matching auth restricted groups are removed when user links to with auth" (#1345 (closed))
  • Improves performance for all service related admin pages, e.g. Discord User
  • Adds public API to the Discord service for community apps with api module
  • Improves internal structure of Discord service, e.g.:
    • Adds new core module for all service related core logic that has no direct relation to the model
    • Moves logic to fetch roles of a guild member to Discord client
    • Now uses objects for Discord entities (guild, guild member, role, user) with proper mapping instead of re-using the raw dictionaries from the API
  • Improves documentation of Discord service and Discord client
  • Adds API documentation for Discord Client & Discord service
  • Adds and improves tests (e.g. replaces most fixtures with test data factories)
  • Moves NoSocketsTestcase to allianceauth.utils
  • Mocks out API access in analytics.tests.test_tasks

In addition to passing the extensive test suite (almost 300 tests) these changes have also passed a manual test with a live Discord server, which included a test for #1345 (closed), but not for #1345 (closed) (I have no Nitro roles to test with).

Fixes #1334 (closed) Fixes #1345 (closed)

Edited by Erik Kalkoken

Merge request reports