Revision f55cf326 web_client/src/gr/grnet/pithos/web/client/PermissionsList.java
b/web_client/src/gr/grnet/pithos/web/client/PermissionsList.java | ||
---|---|---|
155 | 155 |
|
156 | 156 |
/** |
157 | 157 |
* Examines whether or not the user's full name exists in the |
158 |
* userFullNameMap in the GSS.java for every element of the input list.
|
|
158 |
* userFullNameMap in the Pithos.java for every element of the input list.
|
|
159 | 159 |
* If the user's full name does not exist in the map then a request is being made |
160 | 160 |
* for the specific username. |
161 | 161 |
* |
... | ... | |
173 | 173 |
aPermissions.remove(dto); |
174 | 174 |
handleFullNames(aPermissions); |
175 | 175 |
} |
176 |
}else if(GSS.get().findUserFullName(dto.getUser()) != null){
|
|
176 |
}else if(Pithos.get().findUserFullName(dto.getUser()) != null){
|
|
177 | 177 |
if(aPermissions.size() >= 1){ |
178 | 178 |
aPermissions.remove(dto); |
179 | 179 |
handleFullNames(aPermissions); |
... | ... | |
209 | 209 |
permTable.setHTML(i, 0, "<span id=permissionList.Owner>" + AbstractImagePrototype.create(images.permUser()).getHTML() + " Owner</span>"); |
210 | 210 |
removeButton.setVisible(false); |
211 | 211 |
}else{ |
212 |
permTable.setHTML(i, 0, "<span id=permissionList."+GSS.get().findUserFullName(dto.getUser())+">"+ AbstractImagePrototype.create(images.permUser()).getHTML() + " "+ GSS.get().findUserFullName(dto.getUser()) + "</span>");
|
|
212 |
permTable.setHTML(i, 0, "<span id=permissionList."+ Pithos.get().findUserFullName(dto.getUser())+">"+ AbstractImagePrototype.create(images.permUser()).getHTML() + " "+ Pithos.get().findUserFullName(dto.getUser()) + "</span>");
|
|
213 | 213 |
} |
214 | 214 |
}else if(dto.getGroup() != null){ |
215 | 215 |
permTable.setHTML(i, 0, "<span id=permissionList."+dto.getGroup()+">" + AbstractImagePrototype.create(images.permGroup()).getHTML() + " "+ dto.getGroup() + "</span>"); |
... | ... | |
257 | 257 |
|
258 | 258 |
private void findFullNameAndUpdate(final Set<PermissionHolder> aPermissions){ |
259 | 259 |
final PermissionHolder dto = aPermissions.iterator().next(); |
260 |
String path = GSS.get().getApiPath() + "users/" + dto.getUser();
|
|
260 |
String path = Pithos.get().getApiPath() + "users/" + dto.getUser();
|
|
261 | 261 |
|
262 | 262 |
GetCommand<UserSearchResource> gg = new GetCommand<UserSearchResource>(UserSearchResource.class, path, false,null) { |
263 | 263 |
@Override |
... | ... | |
266 | 266 |
for (UserResource user : result.getUsers()){ |
267 | 267 |
String username = user.getUsername(); |
268 | 268 |
String userFullName = user.getName(); |
269 |
GSS.get().putUserToMap(username, userFullName);
|
|
269 |
Pithos.get().putUserToMap(username, userFullName);
|
|
270 | 270 |
if(aPermissions.size() >= 1){ |
271 | 271 |
aPermissions.remove(dto); |
272 | 272 |
if(aPermissions.isEmpty()){ |
... | ... | |
279 | 279 |
} |
280 | 280 |
@Override |
281 | 281 |
public void onError(Throwable t) { |
282 |
GSS.get().displayError("Unable to fetch user's full name from the given username " + dto.getUser());
|
|
282 |
Pithos.get().displayError("Unable to fetch user's full name from the given username " + dto.getUser());
|
|
283 | 283 |
if(aPermissions.size() >= 1){ |
284 | 284 |
aPermissions.remove(dto); |
285 | 285 |
if(aPermissions.isEmpty()){ |
Also available in: Unified diff