diff --git a/allianceauth/services/modules/discord/templates/services/discord/discord_service_ctrl.html b/allianceauth/services/modules/discord/templates/services/discord/discord_service_ctrl.html index 5fe4f0fa..d5e07420 100644 --- a/allianceauth/services/modules/discord/templates/services/discord/discord_service_ctrl.html +++ b/allianceauth/services/modules/discord/templates/services/discord/discord_service_ctrl.html @@ -28,7 +28,7 @@ {% endif %} {% if request.user.is_superuser %}
- + {% trans "Link Discord Server" %}
diff --git a/allianceauth/services/modules/discord/tests/test_integration.py b/allianceauth/services/modules/discord/tests/test_integration.py index e18f09fb..260159a7 100644 --- a/allianceauth/services/modules/discord/tests/test_integration.py +++ b/allianceauth/services/modules/discord/tests/test_integration.py @@ -483,15 +483,16 @@ class TestUserFeatures(WebTest): mock_exception.response.status_code = 440 requests_mocker.get(guild_infos_request.url, exc=mock_exception) - # login - superuser = User.objects.create_superuser( - "admin", "admin@example.com", "admin123" - ) - AuthUtils.add_main_character_2(superuser, "my_main", 1099) - self.app.set_user(superuser) + # login + self.member.is_superuser = True + self.member.is_staff = True + self.member.save() + self.app.set_user(self.member) # click deactivate on the service page response = self.app.get(reverse('services:services')) - # check we got can see the page + # check we got can see the page and the "link server" button self.assertEqual(response.status_int, 200) + self.assertIsNotNone(response.html.find(id='btnLinkDiscordServer')) + \ No newline at end of file diff --git a/allianceauth/services/modules/example/auth_hooks.py b/allianceauth/services/modules/example/auth_hooks.py index 5b1fe7b0..42df64cc 100644 --- a/allianceauth/services/modules/example/auth_hooks.py +++ b/allianceauth/services/modules/example/auth_hooks.py @@ -25,10 +25,10 @@ class ExampleService(ServicesHook): :return: """ urls = self.Urls() - urls.auth_activate = 'auth_example_activate' - urls.auth_deactivate = 'auth_example_deactivate' - urls.auth_reset_password = 'auth_example_reset_password' - urls.auth_set_password = 'auth_example_set_password' + # urls.auth_activate = 'auth_example_activate' + # urls.auth_deactivate = 'auth_example_deactivate' + # urls.auth_reset_password = 'auth_example_reset_password' + # urls.auth_set_password = 'auth_example_set_password' return render_to_string(self.service_ctrl_template, { 'service_name': self.title, 'urls': urls,