Describe core revision actions cherrypick, rebase, submit
Exporting these actions as UiCommands makes them visible in the actions map of a RevisionInfo if CURRENT_ACTIONS option was requested by the client. This gives the client hints about which actions the caller can invoke at the time the RevisionInfo was retrieved. Change-Id: I17510aed35e000e1d9fc9eb24c3646b4a72bfac9
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
|
||||
package com.google.gerrit.httpd.rpc.changedetail;
|
||||
|
||||
import com.google.gerrit.common.data.Capable;
|
||||
import com.google.gerrit.common.data.ChangeDetail;
|
||||
import com.google.gerrit.common.data.ChangeInfo;
|
||||
import com.google.gerrit.common.data.SubmitRecord;
|
||||
@@ -136,9 +135,7 @@ public class ChangeDetailFactory extends Handler<ChangeDetail> {
|
||||
changeId));
|
||||
|
||||
detail.setCanRevert(change.getStatus() == Change.Status.MERGED && control.canAddPatchSet());
|
||||
|
||||
detail.setCanCherryPick(control.getProjectControl().canPushToAtLeastOneRef() == Capable.OK);
|
||||
|
||||
detail.setCanCherryPick(control.getProjectControl().canUpload());
|
||||
detail.setCanEdit(control.getRefControl().canWrite());
|
||||
detail.setCanEditCommitMessage(change.getStatus().isOpen() && control.canAddPatchSet());
|
||||
detail.setCanEditTopicName(control.canEditTopicName());
|
||||
|
||||
Reference in New Issue
Block a user