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["page_type"] = "contests"
|
||||||
context["hide_contest_orgs"] = True
|
context["hide_contest_orgs"] = True
|
||||||
context.pop("organizations")
|
context.pop("organizations")
|
||||||
context["create_url"] = reverse(
|
|
||||||
"organization_contest_add",
|
if self.can_edit_organization(self.organization):
|
||||||
args=[self.organization.id, self.organization.slug],
|
context["create_url"] = reverse(
|
||||||
)
|
"organization_contest_add",
|
||||||
|
args=[self.organization.id, self.organization.slug],
|
||||||
|
)
|
||||||
|
|
||||||
for participation in context["active_participations"]:
|
for participation in context["active_participations"]:
|
||||||
self.set_editable_contest(participation.contest)
|
self.set_editable_contest(participation.contest)
|
||||||
|
|
Loading…
Reference in a new issue