mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-23 11:16:07 +02:00
updated for pr feedback
This commit is contained in:
parent
604a95624a
commit
ca0ab8fa6b
2 changed files with 2 additions and 37 deletions
|
@ -49,7 +49,7 @@
|
|||
</div>
|
||||
|
||||
{% url 'user-profile' as url %}
|
||||
{% include "includes/summary_item.html" with title='Your Contact Information' value=user edit_link=url editable=is_editable contact='true' %}
|
||||
{% include "includes/summary_item.html" with title='Your Contact Information' value=request.user edit_link=url editable=is_editable contact='true' %}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -311,24 +311,11 @@ class DomainView(DomainBaseView):
|
|||
self._update_session_with_domain()
|
||||
|
||||
|
||||
class DomainRenewalView(DomainBaseView):
|
||||
class DomainRenewalView(DomainView):
|
||||
"""Domain detail overview page."""
|
||||
|
||||
template_name = "domain_renewal.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
|
||||
default_emails = [DefaultEmail.PUBLIC_CONTACT_DEFAULT.value, DefaultEmail.LEGACY_DEFAULT.value]
|
||||
context["hidden_security_emails"] = default_emails
|
||||
|
||||
security_email = self.object.get_security_email()
|
||||
user = self.request.user
|
||||
if security_email is None or security_email in default_emails:
|
||||
context["security_email"] = None
|
||||
context["user"] = user
|
||||
return context
|
||||
|
||||
def can_access_domain_via_portfolio(self, pk):
|
||||
"""Most views should not allow permission to portfolio users.
|
||||
If particular views allow permissions, they will need to override
|
||||
|
@ -341,28 +328,6 @@ class DomainRenewalView(DomainBaseView):
|
|||
return True
|
||||
return False
|
||||
|
||||
def in_editable_state(self, pk):
|
||||
"""Override in_editable_state from DomainPermission
|
||||
Allow detail page to be viewable"""
|
||||
|
||||
requested_domain = None
|
||||
if Domain.objects.filter(id=pk).exists():
|
||||
requested_domain = Domain.objects.get(id=pk)
|
||||
|
||||
# return true if the domain exists, this will allow the detail page to load
|
||||
if requested_domain:
|
||||
return True
|
||||
return False
|
||||
|
||||
def _get_domain(self, request):
|
||||
"""
|
||||
override get_domain for this view so that domain overview
|
||||
always resets the cache for the domain object
|
||||
"""
|
||||
self.session = request.session
|
||||
self.object = self.get_object()
|
||||
self._update_session_with_domain()
|
||||
|
||||
def post(self, request, pk):
|
||||
domain = get_object_or_404(Domain, id=pk)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue