Fixed redirect for login url
[pithos-web-client] / src / gr / grnet / pithos / web / client / PermissionsAddDialog.java
index 8b28f62..84c2d01 100644 (file)
@@ -35,7 +35,8 @@
 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;
 
@@ -104,7 +105,7 @@ public class PermissionsAddDialog extends DialogBox {
         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();
             }
@@ -116,7 +117,7 @@ public class PermissionsAddDialog extends DialogBox {
         // 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();
             }
         });
@@ -131,7 +132,7 @@ public class PermissionsAddDialog extends DialogBox {
         setWidget(panel);
        }
 
-       private void addPermission() {
+       protected void addPermission() {
         String selected = null;
                if (userAdd) {
                        selected = userBox.getText();
@@ -140,8 +141,7 @@ public class PermissionsAddDialog extends DialogBox {
             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();