Skip to content

Commit 0b15e3a

Browse files
authored
Delete outdated warning message (#12368)
This was introduced in ed0d02b, likely when the new bitbucket provider was added. The registry doesn't have Google and SAML listed, so users with accounts connected to those providers are shown this warning, which is confusing. I checked the DB on .org and .com, and there are no users with unsupported providers.
1 parent 3a4cdad commit 0b15e3a

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

readthedocs/projects/views/private.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Project views for authenticated users."""
22

33
import structlog
4-
from allauth.socialaccount.models import SocialAccount
54
from django.conf import settings
65
from django.contrib import messages
76
from django.contrib.messages.views import SuccessMessageMixin
@@ -15,7 +14,6 @@
1514
from django.shortcuts import get_object_or_404
1615
from django.urls import reverse
1716
from django.utils import timezone
18-
from django.utils.html import format_html
1917
from django.utils.translation import gettext_lazy as _
2018
from django.views.generic import ListView
2119
from django.views.generic import TemplateView
@@ -47,7 +45,6 @@
4745
from readthedocs.notifications.models import Notification
4846
from readthedocs.oauth.constants import GITHUB
4947
from readthedocs.oauth.services import GitHubService
50-
from readthedocs.oauth.services import registry
5148
from readthedocs.oauth.tasks import attach_webhook
5249
from readthedocs.oauth.utils import update_webhook
5350
from readthedocs.projects.filters import ProjectListFilterSet
@@ -434,34 +431,6 @@ class ImportView(PrivateViewMixin, TemplateView):
434431
template_name = "projects/project_import.html"
435432
wizard_class = ImportWizardView
436433

437-
def get(self, request, *args, **kwargs):
438-
"""
439-
Display list of repositories to import.
440-
441-
Adds a warning to the listing if any of the accounts connected for the
442-
user are not supported accounts.
443-
"""
444-
deprecated_accounts = SocialAccount.objects.filter(
445-
user=self.request.user
446-
).exclude(
447-
provider__in=[service.allauth_provider.id for service in registry],
448-
) # yapf: disable
449-
for account in deprecated_accounts:
450-
provider_account = account.get_provider_account()
451-
messages.error(
452-
request,
453-
format_html(
454-
_(
455-
"There is a problem with your {service} account, "
456-
"try reconnecting your account on your "
457-
'<a href="{url}">connected services page</a>.',
458-
),
459-
service=provider_account.get_brand()["name"],
460-
url=reverse("socialaccount_connections"),
461-
),
462-
)
463-
return super().get(request, *args, **kwargs)
464-
465434
def post(self, request, *args, **kwargs):
466435
initial_data = {}
467436
initial_data["basics"] = {}

0 commit comments

Comments
 (0)