Organization contest list: Only show create button for admin
This commit is contained in:
parent
896eec6c22
commit
f1ba0e79c1
1 changed files with 6 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue