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:
@@ -254,11 +254,6 @@ public class Submit
|
|||||||
return BLOCKED_HIDDEN_SUBMIT_TOOLTIP;
|
return BLOCKED_HIDDEN_SUBMIT_TOOLTIP;
|
||||||
}
|
}
|
||||||
for (ChangeData c : cs.changes()) {
|
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 =
|
Set<ChangePermission> can =
|
||||||
permissionBackend
|
permissionBackend
|
||||||
.user(user)
|
.user(user)
|
||||||
@@ -307,10 +302,7 @@ public class Submit
|
|||||||
@Override
|
@Override
|
||||||
public UiAction.Description getDescription(RevisionResource resource) {
|
public UiAction.Description getDescription(RevisionResource resource) {
|
||||||
Change change = resource.getChange();
|
Change change = resource.getChange();
|
||||||
if (!change.getStatus().isOpen()
|
if (!change.getStatus().isOpen() || !resource.isCurrent()) {
|
||||||
|| change.isWorkInProgress()
|
|
||||||
|| !resource.isCurrent()
|
|
||||||
|| !resource.permissions().testOrFalse(ChangePermission.SUBMIT)) {
|
|
||||||
return null; // submit not visible
|
return null; // submit not visible
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user