diff --git a/templates/member/profile.html b/templates/member/profile.html index f88ba71e98..fcdb6d9ff0 100644 --- a/templates/member/profile.html +++ b/templates/member/profile.html @@ -858,6 +858,23 @@
+ {% trans "Bannir le fournisseur email" %} +
+ + + {% endif %} {% endif %} {% endif %} diff --git a/zds/member/views/profile.py b/zds/member/views/profile.py index 16b0a83aaf..eb8c5d263d 100644 --- a/zds/member/views/profile.py +++ b/zds/member/views/profile.py @@ -199,7 +199,13 @@ def get_context_data(self, **kwargs): context["alerts"] = profile.alerts_on_this_profile.all().order_by("-pubdate") context["has_unsolved_alerts"] = profile.alerts_on_this_profile.filter(solved=False).exists() + if self.request.user.has_perm("user.change_bannedemailprovider"): + new_provider = NewEmailProvider.objects.filter(user=usr).first() + if new_provider is not None: + context["provider_to_ban"] = new_provider + context["summaries"] = self.get_summaries(profile, hide_forum_activity) + return context