Revision c1638c18

b/src/gr/grnet/pithos/web/client/PermissionsAddDialog.java
140 140
        String selected = null;
141 141
		if (userAdd) {
142 142
			selected = userBox.getText();
143
		} else {
143
		} else if (groupBox.getSelectedIndex() > -1) {
144 144
			String groupName = groupBox.getValue(groupBox.getSelectedIndex());
145
            selected = app.getUsername() + ":" + groupName;
145
			selected = app.getUsername() + ":" + groupName;
146 146
		}
147 147
        if (permList.getPermissions().get(selected) != null) {
148 148
            return;
149 149
        }
150
        if (selected == null || selected.length() == 0 || selected.equals(app.getUsername() + ":")) {
151
        	app.displayError("You have to select o username or group");
152
        	return;
153
        }
150 154
		boolean readValue = read.getValue();
151 155
		boolean writeValue = write.getValue();
152 156

  

Also available in: Unified diff