Allow publishing old non-current patch sets
Change-Id: I32ec6a514c20c44f86aaa823cca157181b56c96e Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -137,13 +137,11 @@ public class Publish implements RestModifyView<RevisionResource, Input>,
|
||||
|
||||
@Override
|
||||
public UiAction.Description getDescription(RevisionResource rsrc) {
|
||||
PatchSet.Id current = rsrc.getChange().currentPatchSetId();
|
||||
try {
|
||||
return new UiAction.Description()
|
||||
.setTitle(String.format("Publish revision %d",
|
||||
rsrc.getPatchSet().getPatchSetId()))
|
||||
.setVisible(rsrc.getPatchSet().isDraft()
|
||||
&& rsrc.getPatchSet().getId().equals(current)
|
||||
&& rsrc.getControl().canPublish(dbProvider.get()));
|
||||
} catch (OrmException e) {
|
||||
throw new IllegalStateException(e);
|
||||
|
Reference in New Issue
Block a user