package gr.grnet.pithos.web.client;
import com.google.gwt.user.client.ui.TextBox;
-import gr.grnet.pithos.web.client.foldertree.Group;
+
+import gr.grnet.pithos.web.client.grouptree.Group;
import java.util.List;
final HorizontalPanel buttons = new HorizontalPanel();
final Button ok = new Button("OK", new ClickHandler() {
@Override
- public void onClick(ClickEvent event) {
+ public void onClick(@SuppressWarnings("unused") ClickEvent event) {
addPermission();
hide();
}
// when the button is clicked.
final Button cancel = new Button("Cancel", new ClickHandler() {
@Override
- public void onClick(ClickEvent event) {
+ public void onClick(@SuppressWarnings("unused") ClickEvent event) {
hide();
}
});
setWidget(panel);
}
- private void addPermission() {
+ protected void addPermission() {
String selected = null;
if (userAdd) {
selected = userBox.getText();
selected = app.getUsername() + ":" + groupName;
}
if (permList.getPermissions().get(selected) != null) {
- app.displayError((userAdd ? "User " : "Group ") + "already has access to the resource");
- return;
+ return;
}
boolean readValue = read.getValue();
boolean writeValue = write.getValue();