remove extra sections
parent
f7c6f4e1b4
commit
c73f24561f
|
@ -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")),
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue