Remove meetup from homepage section
parent
54fe5ba79c
commit
fc9af7d1df
|
@ -29,8 +29,7 @@ class Section(enum.IntEnum):
|
||||||
issues = 6
|
issues = 6
|
||||||
wiki = 7
|
wiki = 7
|
||||||
team = 8
|
team = 8
|
||||||
meetup = 9
|
admin = 9
|
||||||
admin = 10
|
|
||||||
|
|
||||||
|
|
||||||
HOMEPAGE_CHOICES = (
|
HOMEPAGE_CHOICES = (
|
||||||
|
@ -42,6 +41,5 @@ HOMEPAGE_CHOICES = (
|
||||||
(Section.issues, _("Issues")),
|
(Section.issues, _("Issues")),
|
||||||
(Section.wiki, _("TeamWiki")),
|
(Section.wiki, _("TeamWiki")),
|
||||||
(Section.team, _("Team")),
|
(Section.team, _("Team")),
|
||||||
(Section.meetup, _("Meet Up")),
|
|
||||||
(Section.admin, _("Admin")),
|
(Section.admin, _("Admin")),
|
||||||
)
|
)
|
||||||
|
|
|
@ -14,9 +14,6 @@ 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 obj.project.videoconferences:
|
|
||||||
sections.append(Section.meetup)
|
|
||||||
|
|
||||||
if is_project_admin(obj.user, obj.project):
|
if is_project_admin(obj.user, obj.project):
|
||||||
sections.append(Section.admin)
|
sections.append(Section.admin)
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,6 @@ def test_retrieve_homepage_setting_with_allowed_sections(client):
|
||||||
# "is_kanban_activated": false,
|
# "is_kanban_activated": false,
|
||||||
# "is_wiki_activated": true,
|
# "is_wiki_activated": true,
|
||||||
# "is_issues_activated": true,
|
# "is_issues_activated": true,
|
||||||
# "videoconferences": null,
|
|
||||||
user = f.UserFactory.create()
|
user = f.UserFactory.create()
|
||||||
project = f.ProjectFactory.create(owner=user)
|
project = f.ProjectFactory.create(owner=user)
|
||||||
membership = f.MembershipFactory.create(user=user, project=project, is_admin=False)
|
membership = f.MembershipFactory.create(user=user, project=project, is_admin=False)
|
||||||
|
@ -77,7 +76,6 @@ def test_avoid_patch_homepage_setting_with_not_allowed_section(client):
|
||||||
# "is_kanban_activated": false,
|
# "is_kanban_activated": false,
|
||||||
# "is_wiki_activated": true,
|
# "is_wiki_activated": true,
|
||||||
# "is_issues_activated": true,
|
# "is_issues_activated": true,
|
||||||
# "videoconferences": null,
|
|
||||||
user = f.UserFactory.create()
|
user = f.UserFactory.create()
|
||||||
project = f.ProjectFactory.create(owner=user)
|
project = f.ProjectFactory.create(owner=user)
|
||||||
membership = f.MembershipFactory.create(user=user, project=project,
|
membership = f.MembershipFactory.create(user=user, project=project,
|
||||||
|
|
Loading…
Reference in New Issue