mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-05 09:21:54 +02:00
Remove duplicated function
This commit is contained in:
parent
6b1185e9b7
commit
797561df45
1 changed files with 0 additions and 12 deletions
|
@ -316,18 +316,6 @@ class DomainRenewalView(DomainView):
|
|||
|
||||
template_name = "domain_renewal.html"
|
||||
|
||||
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
|
||||
this function."""
|
||||
portfolio = self.request.session.get("portfolio")
|
||||
if self.request.user.has_any_domains_portfolio_permission(portfolio):
|
||||
if Domain.objects.filter(id=pk).exists():
|
||||
domain = Domain.objects.get(id=pk)
|
||||
if domain.domain_info.portfolio == portfolio:
|
||||
return True
|
||||
return False
|
||||
|
||||
def post(self, request, pk):
|
||||
|
||||
domain = get_object_or_404(Domain, id=pk)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue