added is_editable to domain; added editable to domain_detail.html; added editable to domain_sidebar.html; added editable to summary_item.html; updated has_permission in domain views to check for domain editable

This commit is contained in:
David Kennedy 2023-11-22 10:36:13 -05:00
parent 6400367368
commit 6da9fdab2a
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
4 changed files with 18 additions and 8 deletions

View file

@ -880,6 +880,14 @@ class Domain(TimeStampedModel, DomainHelper):
"""
return self.state == self.State.READY
def is_editable(self) -> bool:
"""domain is editable unless state is on hold or deleted"""
return self.state in [
self.State.UNKNOWN,
self.State.DNS_NEEDED,
self.State.READY,
]
def transfer(self):
"""Going somewhere. Not implemented."""
raise NotImplementedError()