Organization contest list: Only show create button for admin

This commit is contained in:
cuom1999 2024-05-05 23:59:11 -05:00
parent 896eec6c22
commit f1ba0e79c1

View file

@ -427,6 +427,8 @@ class OrganizationContests(
context["page_type"] = "contests" context["page_type"] = "contests"
context["hide_contest_orgs"] = True context["hide_contest_orgs"] = True
context.pop("organizations") context.pop("organizations")
if self.can_edit_organization(self.organization):
context["create_url"] = reverse( context["create_url"] = reverse(
"organization_contest_add", "organization_contest_add",
args=[self.organization.id, self.organization.slug], args=[self.organization.id, self.organization.slug],