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

@@ -741,6 +741,12 @@ public abstract class AbstractDaemonTest {
protected PermissionRule block(String permission, AccountGroup.UUID id, String ref)
throws Exception {
return block(permission, id, ref, project);
}
protected PermissionRule block(String permission,
AccountGroup.UUID id, String ref, Project.NameKey project)
throws Exception {
ProjectConfig cfg = projectCache.checkedGet(project).getConfig();
PermissionRule rule = Util.block(cfg, permission, id, ref);
saveProjectConfig(project, cfg);