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
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user