Merge lp:~arthur-she/lava-scheduler/fix-for-bug-1172724 into lp:lava-scheduler

Proposed by Arthur She
Status: Superseded
Proposed branch: lp:~arthur-she/lava-scheduler/fix-for-bug-1172724
Merge into: lp:lava-scheduler
Diff against target: 15 lines (+4/-1)
1 file modified
lava_scheduler_app/models.py (+4/-1)
To merge this branch: bzr merge lp:~arthur-she/lava-scheduler/fix-for-bug-1172724
Reviewer Review Type Date Requested Status
Senthil Kumaran S Needs Fixing
Review via email: mp+171022@code.launchpad.net

This proposal has been superseded by a proposal from 2013-06-24.

Description of the change

Let the logged-in user who is the member of builds / baselines group has the permission to cancel the jobs which were submitted by 'ciadmin'.

To post a comment you must log in.
Revision history for this message
Arthur She (arthur-she) wrote :

Let the logged-in user who is the member of builds / baselines group can manipulate (cancel / re-submit / annotate) the jobs which were submitted by 'ciadmin'

Revision history for this message
Senthil Kumaran S (stylesen) wrote :

Your fixes should be 80 column aligned. Please make sure the line you are editing is 80 column aligned and re-submit the patch.

review: Needs Fixing
249. By Arthur She

fix bug #1172724.
Make the code 80 columns aligned

modified:
  lava_scheduler_app/models.py

250. By Arthur She

fix bug #1172724.
Make the code 80 columns aligned.

modified:
  lava_scheduler_app/models.py

Unmerged revisions

250. By Arthur She

fix bug #1172724.
Make the code 80 columns aligned.

modified:
  lava_scheduler_app/models.py

249. By Arthur She

fix bug #1172724.
Make the code 80 columns aligned

modified:
  lava_scheduler_app/models.py

248. By Arthur She

fix for bux #1172724

modified:
  lava_scheduler_app/models.py

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava_scheduler_app/models.py'
2--- lava_scheduler_app/models.py 2013-02-10 21:26:06 +0000
3+++ lava_scheduler_app/models.py 2013-06-24 09:16:30 +0000
4@@ -477,7 +477,10 @@
5 """ used to check for things like if the user can cancel or annotate
6 a job failure
7 """
8- return user.is_superuser or user == self.submitter
9+ ci_admin_groups = ['builds', 'baselines']
10+ return (user.is_superuser or user == self.submitter or
11+ ('ciadmin' == self.submitter.username and
12+ user.groups.filter(name__in=ci_admin_groups).exists()))
13
14 def can_annotate(self, user):
15 """

Subscribers

People subscribed via source and target branches