removed useless rpc method to require who's the current user

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@131738 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-09-23 10:47:14 +00:00
parent 378829087c
commit d7884b6ad2
4 changed files with 13 additions and 55 deletions

View File

@ -241,16 +241,10 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
if(folderId != null && !folderId.isEmpty()){
final Modal modal = new Modal(true, true);
// request who's doing the insert
rpcWorkspaceService.getUser(new AsyncCallback<String>() {
@Override
public void onSuccess(String username) {
if (username != null) {
modal.setTitle("Publish Product");
modal.addStyleName("insert-metadata-modal-style");
modal.add(new CreateDatasetForm(folderId, username, eventBus));
modal.add(new CreateDatasetForm(folderId, eventBus));
modal.setCloseVisible(true);
modal.show();
@ -262,17 +256,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
eventBus.fireEvent(new CloseCreationFormEvent());
}
});
}
else
Window.alert("Sorry, it is not possible to publish on the catalogue at the moment.");
}
@Override
public void onFailure(Throwable caught) {
Window.alert("Sorry, it is not possible to publish on the catalogue at the moment.");
}
});
}
}
});

View File

@ -694,12 +694,6 @@ public interface GWTWorkspaceService extends RemoteService{
FileModel getItemForFileTree(String itemId) throws Exception;
/**
* Retrieve the username of the user into the session
* @return the username of the current user
*/
String getUser();
/**
* @return
*/

View File

@ -694,14 +694,6 @@ public interface GWTWorkspaceServiceAsync {
void setGcubeItemProperties(String itemId, Map<String, String> properties,
AsyncCallback<Void> callback);
/**
* Retrieve the username of the user into the session.
*
* @param callback the callback
* @return the username of the current user
*/
void getUser(AsyncCallback<String> callback);
/**
* Gets the my first name.
*

View File

@ -42,7 +42,6 @@ import org.gcube.common.homelibrary.home.workspace.folder.items.GCubeItem;
import org.gcube.common.homelibrary.home.workspace.search.SearchItem;
import org.gcube.common.homelibrary.home.workspace.trash.WorkspaceTrashFolder;
import org.gcube.common.homelibrary.home.workspace.trash.WorkspaceTrashItem;
import org.gcube.common.portal.PortalContext;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.datacatalogue.ckanutillibrary.ApplicationProfileScopePerUrlReader;
import org.gcube.datacatalogue.ckanutillibrary.CKanUtils;
@ -66,7 +65,6 @@ import org.gcube.portlets.user.workspace.client.workspace.GWTWorkspaceItem;
import org.gcube.portlets.user.workspace.client.workspace.folder.item.gcube.WorkspaceHandledException;
import org.gcube.portlets.user.workspace.server.notifications.NotificationsProducer;
import org.gcube.portlets.user.workspace.server.notifications.NotificationsUtil;
import org.gcube.portlets.user.workspace.server.property.PortalUrlGroupGatewayProperty;
import org.gcube.portlets.user.workspace.server.reader.ApplicationProfile;
import org.gcube.portlets.user.workspace.server.reader.ApplicationProfileReader;
import org.gcube.portlets.user.workspace.server.resolver.UriResolverReaderParameterForResolverIndex;
@ -3540,16 +3538,6 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
return role;
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService#getUser()
*/
@Override
public String getUser() {
ASLSession session = WsUtil.getAslSession(this.getThreadLocalRequest().getSession());
return session.getUsername();
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService#markFolderAsPublicForFolderItemId(java.lang.String, boolean)
*/