-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CODENVY-27; allow to open workspaces by using /ide/namespace/ws_name schema #1463
Conversation
package org.eclipse.che; | ||
|
||
|
||
import javax.servlet.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not use * in imports
@@ -120,7 +121,7 @@ public void setUp() throws Exception { | |||
EnvironmentContext.setCurrent(new EnvironmentContext() { | |||
@Override | |||
public Subject getSubject() { | |||
return new SubjectImpl("Test User", USER_ID, "token", new ArrayList<>(), false); | |||
return new SubjectImpl(NAMESPACE, USER_ID, "token", new ArrayList<>(), false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need arraylist or an empty list ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you imply Collections.emptyList() here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can simply pass null and new emptySet ill be created
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
Other ok |
ok |
@@ -247,7 +245,7 @@ public void delete(@ApiParam("The workspace id") @PathParam("id") String id) thr | |||
ConflictException, | |||
ForbiddenException { | |||
if (!workspaceManager.getSnapshot(id).isEmpty()) { | |||
machineManager.removeSnapshots(getCurrentUserId(), id); | |||
machineManager.removeSnapshots(EnvironmentContext.getCurrent().getSubject().getUserId(), id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/eclipse/che/blob/master/wsmaster/che-core-api-machine/src/main/java/org/eclipse/che/api/machine/server/dao/SnapshotDao.java#L78-78
namespace should be equal to user name, no?
…schema (#1463) * CODENVY-27; use /namespace/ws_name URL schema for IDE
No description provided.