-
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
Fix WorkspaceService to be able to share workspaces #1359
Conversation
6595163
to
38a31df
Compare
@@ -133,13 +133,13 @@ | |||
List<WorkspaceImpl> getByNamespace(String namespace) throws ServerException; | |||
|
|||
/** | |||
* Gets list of workspaces where user is worker | |||
* Gets list of workspaces where given user is worker and has read permission |
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.
WorkspaceDao should check permissions?
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.
It should get all workspaces by relation between user and workspace. Take a look implementation in codenvy project https://github.com/codenvy/codenvy/blob/workspacePermissions/core/codenvy-hosted-platform-api-impl/src/main/java/com/codenvy/api/dao/mongo/WorkspaceDaoImpl.java#L264-264
38a31df
to
84c7c3e
Compare
76bd716
to
628e52b
Compare
628e52b
to
b485b2e
Compare
requireNonNull(namespace, "Required non-null workspace namespace"); | ||
final List<WorkspaceImpl> workspaces = workspaceDao.getByNamespace(namespace); | ||
public List<WorkspaceImpl> getWorkspaces(String user) throws ServerException { | ||
requireNonNull(user, "Required non-null workspace namespace"); |
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.
fix namespace
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.
Fixed. Thx
The |
ok |
8148a3a
to
7563a11
Compare
Build # 736 - FAILED Please check console output at http://ci.codenvy-dev.com/jenkins/job/che-pullrequests-build/736/ to view the results. |
@skabashnyuk Can you please review my changes?
@evoevodin Can you please take a look changes in WorkspaceManager?