Allow staff users to see non-public plans
This commit is contained in:
parent
fdcba9ab4e
commit
8a839c351f
1 changed files with 2 additions and 0 deletions
|
|
@ -8,6 +8,8 @@ class GovPlanDetailView(DetailView):
|
|||
template_name = "froide_govplan/detail.html"
|
||||
|
||||
def get_queryset(self):
|
||||
if self.request.user.is_authenticated and self.request.user.is_staff:
|
||||
return GovernmentPlan.objects.all()
|
||||
return GovernmentPlan.objects.filter(public=True)
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue