From f500a4ff50ebea3a000096e55398b428e14eaea3 Mon Sep 17 00:00:00 2001 From: rachidatecs Date: Tue, 1 Aug 2023 19:06:40 -0400 Subject: [PATCH] pseudo code for 796 and 806 --- src/registrar/templates/home.html | 2 ++ src/registrar/views/utility/mixins.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/src/registrar/templates/home.html b/src/registrar/templates/home.html index 6163a1ce0..792beec43 100644 --- a/src/registrar/templates/home.html +++ b/src/registrar/templates/home.html @@ -33,6 +33,8 @@ {% for domain in domains %} + {% comment %} ticket 796 + {% if domain.application_status == "approved" or (domain.application does not exist) %} {% endcomment %} {{ domain.name }} diff --git a/src/registrar/views/utility/mixins.py b/src/registrar/views/utility/mixins.py index 890b10a02..147712582 100644 --- a/src/registrar/views/utility/mixins.py +++ b/src/registrar/views/utility/mixins.py @@ -24,6 +24,11 @@ class DomainPermission(PermissionsLoginMixin): The user is in self.request.user and the domain needs to be looked up from the domain's primary key in self.kwargs["pk"] """ + + # ticket 806 + # if self.request.user is staff or admin and domain.application__status = 'approved' or 'rejected' or 'action needed' + # return True + if not self.request.user.is_authenticated: return False @@ -32,6 +37,10 @@ class DomainPermission(PermissionsLoginMixin): user=self.request.user, domain__id=self.kwargs["pk"] ).exists(): return False + + # ticket 796 + # if domain.application__status != 'approved' + # return false # if we need to check more about the nature of role, do it here. return True