GWT UI: Allow to set blocking label range rules
The UI was never extended to apply blocking action to label range rules. Moreover, if the blocking label range rule is set by manipulation of project.config file on refs/meta/config branch, the UI is erroneously rendering this label range as ALLOW action (in fact, there is no action at all, so ALLOW action is implied), even though, in reality the blocking action was defined. Bug: Issue 6367 Change-Id: I1865ec5bc9410c42bd6d7244198a6b00143c6771
This commit is contained in:
parent
8939ee8602
commit
f61da52c64
@ -111,6 +111,12 @@ public class PermissionRuleEditor extends Composite
|
||||
min = minList;
|
||||
max = maxList;
|
||||
|
||||
action.setAcceptableValues(
|
||||
Arrays.asList(
|
||||
PermissionRule.Action.ALLOW,
|
||||
PermissionRule.Action.DENY,
|
||||
PermissionRule.Action.BLOCK));
|
||||
|
||||
} else {
|
||||
min = new RangeBox.Box();
|
||||
max = new RangeBox.Box();
|
||||
@ -144,15 +150,13 @@ public class PermissionRuleEditor extends Composite
|
||||
}
|
||||
force.setVisible(canForce);
|
||||
force.setEnabled(!readOnly);
|
||||
action.getElement().setPropertyBoolean("disabled", readOnly);
|
||||
|
||||
if (validRange != null) {
|
||||
min.setEnabled(!readOnly);
|
||||
max.setEnabled(!readOnly);
|
||||
action.getElement().getStyle().setDisplay(Display.NONE);
|
||||
|
||||
} else {
|
||||
rangeEditor.getStyle().setDisplay(Display.NONE);
|
||||
action.getElement().setPropertyBoolean("disabled", readOnly);
|
||||
}
|
||||
|
||||
if (readOnly) {
|
||||
|
Loading…
Reference in New Issue
Block a user