mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-16 14:34:10 +02:00
Merge pull request #3636 from cisagov/rh/3576-phantom-domain-request
#3576: Phantom Domain Request - [RH]
This commit is contained in:
commit
e557df2e94
4 changed files with 13 additions and 6 deletions
|
@ -207,6 +207,17 @@ Linters:
|
||||||
docker-compose exec app ./manage.py lint
|
docker-compose exec app ./manage.py lint
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Get availability for domain requests to work locally
|
||||||
|
|
||||||
|
If you're on local (localhost:8080) and want to submit a domain request, and keep getting the "We’re experiencing a system error. Please wait a few minutes and try again. If you continue to get this error, contact help@get.gov." error, you can get past the availability check by updating the available() function in registrar/models/domain.py to return True and comment everything else out - see below for reference!
|
||||||
|
|
||||||
|
```
|
||||||
|
@classmethod
|
||||||
|
def available(cls, domain: str) -> bool:
|
||||||
|
# Comment everything else out in the function
|
||||||
|
return True
|
||||||
|
```
|
||||||
|
|
||||||
### Testing behind logged in pages
|
### Testing behind logged in pages
|
||||||
|
|
||||||
To test behind logged in pages with external tools, like `pa11y-ci` or `OWASP Zap`, add
|
To test behind logged in pages with external tools, like `pa11y-ci` or `OWASP Zap`, add
|
||||||
|
|
|
@ -86,7 +86,6 @@ class RequestingEntityForm(RegistrarForm):
|
||||||
return {}
|
return {}
|
||||||
# get the domain request as a dict, per usual method
|
# get the domain request as a dict, per usual method
|
||||||
domain_request_dict = {name: getattr(obj, name) for name in cls.declared_fields.keys()} # type: ignore
|
domain_request_dict = {name: getattr(obj, name) for name in cls.declared_fields.keys()} # type: ignore
|
||||||
|
|
||||||
# set sub_organization to 'other' if is_requesting_new_suborganization is True
|
# set sub_organization to 'other' if is_requesting_new_suborganization is True
|
||||||
if isinstance(obj, DomainRequest) and obj.is_requesting_new_suborganization():
|
if isinstance(obj, DomainRequest) and obj.is_requesting_new_suborganization():
|
||||||
domain_request_dict["sub_organization"] = "other"
|
domain_request_dict["sub_organization"] = "other"
|
||||||
|
|
|
@ -245,6 +245,7 @@ class Domain(TimeStampedModel, DomainHelper):
|
||||||
is called in the validate function on the request/domain page
|
is called in the validate function on the request/domain page
|
||||||
|
|
||||||
throws- RegistryError or InvalidDomainError"""
|
throws- RegistryError or InvalidDomainError"""
|
||||||
|
|
||||||
if not cls.string_could_be_domain(domain):
|
if not cls.string_could_be_domain(domain):
|
||||||
logger.warning("Not a valid domain: %s" % str(domain))
|
logger.warning("Not a valid domain: %s" % str(domain))
|
||||||
# throw invalid domain error so that it can be caught in
|
# throw invalid domain error so that it can be caught in
|
||||||
|
|
|
@ -227,7 +227,6 @@ class DomainRequestWizard(TemplateView):
|
||||||
creator=self.request.user,
|
creator=self.request.user,
|
||||||
portfolio=portfolio,
|
portfolio=portfolio,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Question for reviewers: we should probably be doing this right?
|
# Question for reviewers: we should probably be doing this right?
|
||||||
if portfolio and not self._domain_request.generic_org_type:
|
if portfolio and not self._domain_request.generic_org_type:
|
||||||
self._domain_request.generic_org_type = portfolio.organization_type
|
self._domain_request.generic_org_type = portfolio.organization_type
|
||||||
|
@ -598,7 +597,6 @@ class RequestingEntity(DomainRequestWizard):
|
||||||
"suborganization_state_territory": None,
|
"suborganization_state_territory": None,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
super().save(forms)
|
super().save(forms)
|
||||||
|
|
||||||
|
|
||||||
|
@ -931,11 +929,9 @@ class Finished(DomainRequestWizard):
|
||||||
forms = [] # type: ignore
|
forms = [] # type: ignore
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
context = self.get_context_data()
|
|
||||||
context["domain_request_id"] = self.domain_request.id
|
|
||||||
# clean up this wizard session, because we are done with it
|
# clean up this wizard session, because we are done with it
|
||||||
del self.storage
|
del self.storage
|
||||||
return render(self.request, self.template_name, context)
|
return render(self.request, self.template_name)
|
||||||
|
|
||||||
|
|
||||||
@grant_access(IS_DOMAIN_REQUEST_CREATOR, HAS_PORTFOLIO_DOMAIN_REQUESTS_EDIT)
|
@grant_access(IS_DOMAIN_REQUEST_CREATOR, HAS_PORTFOLIO_DOMAIN_REQUESTS_EDIT)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue