Merge lp:~daker/loco-team-portal/fix.1251958 into lp:loco-team-portal

Proposed by Adnane Belmadiaf
Status: Merged
Approved by: Adnane Belmadiaf
Approved revision: 662
Merged at revision: 663
Proposed branch: lp:~daker/loco-team-portal/fix.1251958
Merge into: lp:loco-team-portal
Diff against target: 24 lines (+6/-2)
1 file modified
loco_directory/teams/views.py (+6/-2)
To merge this branch: bzr merge lp:~daker/loco-team-portal/fix.1251958
Reviewer Review Type Date Requested Status
Michael Hall (community) Approve
Review via email: mp+196449@code.launchpad.net

Commit message

Added the ability to merge teams for LC

To post a comment you must log in.
Revision history for this message
Chris Johnston (cjohnston) wrote :

Voting does not meet specified criteria. Required: Approve >= 1. Got: 1 Pending.

Revision history for this message
Michael Hall (mhall119) wrote :

Looks good to me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'loco_directory/teams/views.py'
2--- loco_directory/teams/views.py 2013-10-30 00:43:18 +0000
3+++ loco_directory/teams/views.py 2013-11-24 14:30:15 +0000
4@@ -236,7 +236,9 @@
5
6 #check if user has needed rights
7 is_admin = launchpad.is_admin_or_owner(request.user.username, team_object)
8- if not is_admin:
9+ is_on_lc = launchpad.is_user_on_loco_council(request.user)
10+
11+ if not is_admin or not is_on_lc:
12 request.user.message_set.create(message=ugettext('You are not allowed to merge this team with another one.'))
13 return redirect(team_object)
14 team_list = Team.objects.all().order_by('name')
15@@ -258,7 +260,9 @@
16 #check if user has needed rights
17 is_admin = launchpad.is_admin_or_owner(request.user.username, old_team) and \
18 launchpad.is_admin_or_owner(request.user.username, new_team)
19- if not is_admin:
20+ is_on_lc = launchpad.is_user_on_loco_council(request.user)
21+
22+ if not is_admin or not is_on_lc:
23 request.user.message_set.create(message=ugettext('You are not allowed to merge this team with another one.'))
24 return redirect(old_team)
25

Subscribers

People subscribed via source and target branches