Merge changes Ibdcfa4f1,Ibf4540ac into stable-2.16

* changes:
  Submit: Show submit with tooltip when unauthorized/WIP
  Submit: Do not ignore problems for the change itself
This commit is contained in:
David Pursehouse
2019-06-28 01:22:10 +00:00
committed by Gerrit Code Review

View File

@@ -254,11 +254,6 @@ public class Submit
return BLOCKED_HIDDEN_SUBMIT_TOOLTIP;
}
for (ChangeData c : cs.changes()) {
if (cd.getId().equals(c.getId())) {
// We ignore the change about to be submitted, as these checks are already done in the
// #apply and #getDescription methods.
continue;
}
Set<ChangePermission> can =
permissionBackend
.user(user)
@@ -307,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
}