ACL screen: Show error when group to be added is not found
At the moment trying to add a non-existing group for a permission provides no user feedback. The "Working" label is shortly shown, but the user is not told that the entered group doesn't exist. Change-Id: Ifa600fea649298066864deabc0e1e98782e5a8ca Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:

committed by
David Pursehouse

parent
1de95f4de9
commit
f0b5de52f7
@@ -14,6 +14,8 @@
|
||||
|
||||
package com.google.gerrit.client.admin;
|
||||
|
||||
import com.google.gerrit.client.ErrorDialog;
|
||||
import com.google.gerrit.client.Gerrit;
|
||||
import com.google.gerrit.client.rpc.GerritCallback;
|
||||
import com.google.gerrit.client.ui.SuggestUtil;
|
||||
import com.google.gerrit.common.data.AccessSection;
|
||||
@@ -219,7 +221,7 @@ public class PermissionEditor extends Composite implements Editor<Permission>,
|
||||
addStage2.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
|
||||
private void addGroup(GroupReference ref) {
|
||||
private void addGroup(final GroupReference ref) {
|
||||
if (ref.getUUID() != null) {
|
||||
if (value.getRule(ref) == null) {
|
||||
PermissionRule newRule = value.getRule(ref, true);
|
||||
@@ -251,6 +253,8 @@ public class PermissionEditor extends Composite implements Editor<Permission>,
|
||||
addGroup(result.get(0));
|
||||
} else {
|
||||
groupToAdd.setFocus(true);
|
||||
new ErrorDialog(Gerrit.M.noSuchGroupMessage(ref.getName()))
|
||||
.center();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user