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

Public project not visible to everyone #350

Closed
ychae opened this issue Aug 13, 2019 · 12 comments
Closed

Public project not visible to everyone #350

ychae opened this issue Aug 13, 2019 · 12 comments
Assignees
Milestone

Comments

@ychae
Copy link
Contributor

ychae commented Aug 13, 2019

To repro:

  1. Create a Project and select "Public" for visibility
  2. Have another user log in and see if they can see the Project

I currently have a public project called "Project Template" at https://phccp.science.roche.com/ that isn't visible unless I share it with a user explicitly under Settings.

@tschaffter
Copy link
Member

Will be pushed to develop by the end of the day.

@ychae
Copy link
Contributor Author

ychae commented Aug 28, 2019

Error 1:
When a public project is created by Admin, the Test user can see the project but can't open it.

Error 2:
When Test user creates a private project, the project isn't visible to the Test user. It however shows up if you're signed in as Admin.

I can see and open the Project as Test user if I've created the public project as the Test user. I don't get any errors (as far as I can tell) in the console or in Terminal.

This is what I see in my Terminal when I create a private project as Test user:

GET /api/projects/5cb7acea2d718614d81db97f 200 13.083 ms - 285
isAdmin function 5cb7acea2d718614d81cc97e
GET /api/projects 200 28.674 ms - 910

@ychae ychae reopened this Aug 28, 2019
@ychae
Copy link
Contributor Author

ychae commented Aug 28, 2019

cant_open_project

@ychae
Copy link
Contributor Author

ychae commented Aug 28, 2019

Error seen in the console:

ROUTE PLOP projects
platform-browser.js:222 Router Event: NavigationCancel
platform-browser.js:217 NavigationCancel(id: 22, url: '/projects/5d66c0a7fa5592233a80855e')
platform-browser.js:217 

@tschaffter
Copy link
Member

tschaffter commented Aug 30, 2019

Error 1:
When a public project is created by Admin, the Test user can see the project but can't open it.

@ychae This is fixed in branch develop-fix-project-auth in commit f1c5a2a.

phccp_public_project

EDIT: This fix has been merged into develop

@tschaffter
Copy link
Member

tschaffter commented Aug 30, 2019

Error 2:
When Test user creates a private project, the project isn't visible to the Test user. It however shows up if you're signed in as Admin.

@ychae I can reproduce the issue. I'll have a look at this tomorrow. It seems that the Test user can now only see and access public project. However he/she also has access to the other project seed (Admin permission). May be related to #473.

tschaffter added a commit that referenced this issue Aug 30, 2019
Public projects are now accessible via project-guard (#350)
@ychae
Copy link
Contributor Author

ychae commented Aug 30, 2019

@ychae This is fixed in branch develop-fix-project-auth in commit f1c5a2a.

@tschaffter I was able to do a local deploy and confirm that a public project created by admin is visible and clickable by user test. Thanks!

@tschaffter
Copy link
Member

  • Currently a non-admin user can create a public project and access it.
  • The user can create a private project but listing projects doesn't include private project the user has access to.

@tschaffter
Copy link
Member

The Another project has been created by the test user, however the function _hasAccessToEntity denies the access:

GET /api/projects/5cb7acea2d718614d81db97f - - ms - -
_hasAccessToEntity OUTPUT false

The fact that there is no time in ms may suggest an uncaught error.

@tschaffter
Copy link
Member

@ychae The above commit should fix the remaining issues of this ticket (mainly error 2).

phccp_private_project_fixed

@ychae
Copy link
Contributor Author

ychae commented Aug 30, 2019

Whoo-hoo! I can successfully:

  • Create a private project as a test user and access it
  • Create a private project as admin user, invite test user to private project, and test user can see and access the project via invitation

Thanks @tschaffter!

@tschaffter
Copy link
Member

Feature now in develop: 3671c16

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

No branches or pull requests

2 participants