remove extra sections

stable
Álex Hermida 2018-09-24 13:39:48 +02:00 committed by Alex Hermida
parent fc9af7d1df
commit 81ff7fd666
2 changed files with 5 additions and 14 deletions

View File

@ -22,24 +22,18 @@ from django.utils.translation import ugettext_lazy as _
class Section(enum.IntEnum): class Section(enum.IntEnum):
timeline = 1 timeline = 1
search = 2 epics = 2
epics = 3 backlog = 3
backlog = 4 kanban = 4
kanban = 5 issues = 5
issues = 6 wiki = 6
wiki = 7
team = 8
admin = 9
HOMEPAGE_CHOICES = ( HOMEPAGE_CHOICES = (
(Section.timeline, _("Timeline")), (Section.timeline, _("Timeline")),
(Section.search, _("Search")),
(Section.epics, _("Epics")), (Section.epics, _("Epics")),
(Section.backlog, _("Backlog")), (Section.backlog, _("Backlog")),
(Section.kanban, _("Kanban")), (Section.kanban, _("Kanban")),
(Section.issues, _("Issues")), (Section.issues, _("Issues")),
(Section.wiki, _("TeamWiki")), (Section.wiki, _("TeamWiki")),
(Section.team, _("Team")),
(Section.admin, _("Admin")),
) )

View File

@ -14,7 +14,4 @@ def get_allowed_sections(obj):
user_has_perm(obj.user, active_modules[key], obj.project): user_has_perm(obj.user, active_modules[key], obj.project):
sections.append(getattr(Section, key)) sections.append(getattr(Section, key))
if is_project_admin(obj.user, obj.project):
sections.append(Section.admin)
return sections return sections