Skip to content
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

Merged
merged 3 commits into from
May 27, 2016

Conversation

sleshchenko
Copy link
Member

@sleshchenko sleshchenko commented May 26, 2016

@skabashnyuk Can you please review my changes?
@evoevodin Can you please take a look changes in WorkspaceManager?

@sleshchenko sleshchenko force-pushed the workspacePermissions branch 4 times, most recently from 6595163 to 38a31df Compare May 26, 2016 13:09
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WorkspaceDao should check permissions?

Copy link
Member Author

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

@sleshchenko sleshchenko force-pushed the workspacePermissions branch from 38a31df to 84c7c3e Compare May 26, 2016 14:28
@codenvy-ci
Copy link

@sleshchenko sleshchenko force-pushed the workspacePermissions branch 2 times, most recently from 76bd716 to 628e52b Compare May 27, 2016 11:08
@sleshchenko sleshchenko force-pushed the workspacePermissions branch from 628e52b to b485b2e Compare May 27, 2016 11:12
@sleshchenko sleshchenko changed the title [WIP] Fix WorkspaceService to be able to share workspaces Fix WorkspaceService to be able to share workspaces May 27, 2016
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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix namespace

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thx

@voievodin
Copy link
Contributor

The WorkspaceManager looks ok.

@skabashnyuk
Copy link
Contributor

ok

@sleshchenko sleshchenko force-pushed the workspacePermissions branch from 8148a3a to 7563a11 Compare May 27, 2016 12:10
@sleshchenko sleshchenko merged commit 50d0c83 into master May 27, 2016
@sleshchenko sleshchenko deleted the workspacePermissions branch May 27, 2016 12:10
@codenvy-ci
Copy link

Build # 736 - FAILED

Please check console output at http://ci.codenvy-dev.com/jenkins/job/che-pullrequests-build/736/ to view the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants