mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-29 17:00:02 +02:00
Change from LoginRequired to DomainPermission
This commit is contained in:
parent
3789944efc
commit
fc237fed4e
1 changed files with 8 additions and 2 deletions
|
@ -14,6 +14,8 @@ from registrar.models import DomainApplication
|
||||||
from registrar.utility import StrEnum
|
from registrar.utility import StrEnum
|
||||||
from registrar.views.utility import StepsHelper
|
from registrar.views.utility import StepsHelper
|
||||||
|
|
||||||
|
from .utility import DomainPermission
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -486,10 +488,14 @@ class ApplicationStatus(generic.DetailView):
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
class ApplicationWithdraw(generic.DetailView, LoginRequiredMixin):
|
class ApplicationWithdraw(generic.DetailView, DomainPermission):
|
||||||
model = DomainApplication
|
model = DomainApplication
|
||||||
template_name = "application_withdraw_confirmation.html"
|
template_name = "application_withdraw_confirmation.html"
|
||||||
# The page above will display asking user to confirm if they want to withdraw;
|
""" The page above will display asking user to confirm if they want to withdraw;
|
||||||
|
|
||||||
|
Note it uses "DomainPermission" from Domain to ensure that the person who
|
||||||
|
applied only have access to withdraw the request
|
||||||
|
"""
|
||||||
|
|
||||||
def updatestatus(request, pk):
|
def updatestatus(request, pk):
|
||||||
"""If user click on withdraw confirm button, it will be updated to withdraw
|
"""If user click on withdraw confirm button, it will be updated to withdraw
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue