Add ADD_PATCH_SET logic to lock patch sets

I've added a new permission to distinguish between creating a change and
adding new patch sets. This is intended for projects that want to
restrict the upload of new patch sets to the change owner (or any other
group).

Change-Id: If9f9f7ed0f0890fb4b854d0bf71e546ebe43ef96
This commit is contained in:
Patrick Hiesel
2016-06-14 12:34:51 +02:00
parent a008aa9428
commit 26518696c0
15 changed files with 324 additions and 16 deletions

View File

@@ -429,7 +429,8 @@ public abstract class AbstractPushForReview extends AbstractDaemonTest {
PushOneCommit.SUBJECT, "b.txt", "anotherContent", r.getChangeId());
revision(r).review(new ReviewInput().label("Patch-Set-Lock", 1));
r = push.to("refs/for/master");
r.assertErrorStatus("cannot replace " + r.getChange().change().getChangeId()
r.assertErrorStatus("cannot add patch set to "
+ r.getChange().change().getChangeId()
+ ". Change is patch set locked.");
}