Allow to propose changes to access rights through code review

Users that are able to upload changes for code review for the
refs/meta/config branch can now propose changes to the project access
rights through code review directly from the ProjectAccessScreen.

When editing the project access rights there will be a new button
'Save for Review' which will create a new change for the access
rights modifications. Project owners are automatically added as
reviewer to this change. If a project owner agrees to the access rights
modifications he can simply approve and submit the change.

Change-Id: Ica40ce3f57726bdb897e01783cc6da10f1d392cc
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
Signed-off-by: Gustaf Lundh <gustaf.lundh@sonymobile.com>
Signed-off-by: Ulrik Sjölin <ulrik.sjolin@sonyericsson.com>
This commit is contained in:
Edwin Kempin
2012-05-09 02:07:28 +02:00
parent 895d18b7f2
commit 5aa9a2c98d
26 changed files with 492 additions and 199 deletions

View File

@@ -26,6 +26,7 @@ public class ProjectAccess {
protected List<AccessSection> local;
protected Set<String> ownerOf;
protected boolean isConfigVisible;
protected boolean canUpload;
public ProjectAccess() {
}
@@ -94,4 +95,12 @@ public class ProjectAccess {
public void setConfigVisible(boolean isConfigVisible) {
this.isConfigVisible = isConfigVisible;
}
public boolean canUpload() {
return canUpload;
}
public void setCanUpload(boolean canUpload) {
this.canUpload = canUpload;
}
}

View File

@@ -16,6 +16,7 @@ package com.google.gerrit.common.data;
import com.google.gerrit.common.auth.SignInRequired;
import com.google.gerrit.reviewdb.client.Branch;
import com.google.gerrit.reviewdb.client.Change;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gwtjsonrpc.common.AsyncCallback;
import com.google.gwtjsonrpc.common.RemoteJsonService;
@@ -50,6 +51,11 @@ public interface ProjectAdminService extends RemoteJsonService {
String message, List<AccessSection> sections,
AsyncCallback<ProjectAccess> callback);
@SignInRequired
void reviewProjectAccess(Project.NameKey projectName, String baseRevision,
String message, List<AccessSection> sections,
AsyncCallback<Change.Id> callback);
void listBranches(Project.NameKey projectName,
AsyncCallback<ListBranchesResult> callback);