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,10 +427,12 @@ class OrganizationContests(
context["page_type"] = "contests"
context["hide_contest_orgs"] = True
context.pop("organizations")
context["create_url"] = reverse(
"organization_contest_add",
args=[self.organization.id, self.organization.slug],
)
if self.can_edit_organization(self.organization):
context["create_url"] = reverse(
"organization_contest_add",
args=[self.organization.id, self.organization.slug],
)
for participation in context["active_participations"]:
self.set_editable_contest(participation.contest)