From fc623bd65279b8643eda759f6e6ec0e96303c62d Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 12 Nov 2017 15:53:20 +0200 Subject: [PATCH] Submit: Show submit with tooltip when unauthorized/WIP If the change is submittable, but the user is not authorized to submit, there is no indication at all. Show the Submit button on this case, with an appropriate tooltip. Change-Id: Ibdcfa4f1e545fcca8723c19ae343b45183388180 --- java/com/google/gerrit/server/restapi/change/Submit.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/java/com/google/gerrit/server/restapi/change/Submit.java b/java/com/google/gerrit/server/restapi/change/Submit.java index 518e221fb5..7c1011744d 100644 --- a/java/com/google/gerrit/server/restapi/change/Submit.java +++ b/java/com/google/gerrit/server/restapi/change/Submit.java @@ -302,10 +302,7 @@ public class Submit @Override public UiAction.Description getDescription(RevisionResource resource) { Change change = resource.getChange(); - if (!change.getStatus().isOpen() - || change.isWorkInProgress() - || !resource.isCurrent() - || !resource.permissions().testOrFalse(ChangePermission.SUBMIT)) { + if (!change.getStatus().isOpen() || !resource.isCurrent()) { return null; // submit not visible }