icgc-argo / platform-ui

Home of Argo Platform UI + @icgc-argo/uikit
http://platform.icgc-argo.org/
GNU Affero General Public License v3.0
7 stars 7 forks source link

Permissions on Entity Pages: View + Download buttons #1875

Closed rosibaj closed 3 years ago

rosibaj commented 3 years ago

Which users can see the page? Which users can download a file?

Entity pages are subject to access control:

FOR Rosi's testing:

ciaranschutte commented 3 years ago

@rosibaj

ciaranschutte commented 3 years ago

@kcullion just looping you in here because you're the design hero. ^

kcullion commented 3 years ago

@ciaranschutte @rosibaj maybe this 401 page would cover it? https://zpl.io/aBKd1l0 Maybe in this case it could also say, or login if you have program access (if we want to customize that) image

NOte: this page has already been built

rosibaj commented 3 years ago

@ciaranschutte sorry i missed your comment before.

kcullion commented 3 years ago

@rosibaj just to clarify, they will only see links to the file entity pages in the file repo table that they have access to right? So they only see this 401 page if they logout and go to that link?

rosibaj commented 3 years ago

@ciaranschutte @kcullion ive confirmed wiht Jon, we should show the 404 UI page in this case.

@kcullion to answer your question, yes a user should only see links for files they can access. this would happen if

We don't want to show a 401 authorization page, as this this file shouldnt "exist" for a user that doesn't have permission. in the case of crawling for ids, this would give information away we dont want to and the 404 is the right choice to prevent that.

kcullion commented 3 years ago

@rosibaj thanks! Ok, I think the 404 page was built too, in case @ciaranschutte wasn't involved with that

rosibaj commented 3 years ago

Tested April 15 in QA:

ciaranschutte commented 3 years ago

File Repo is source of truth on this one. If you can see it in file repo you can see the page. There are still filtering bugs from arranger that have been referenced previously. https://github.com/icgc-argo/platform-api/issues/364 https://github.com/icgc-argo/platform-api/issues/393 As far as frontend is concerned, we deal with an empty data response correctly

ciaranschutte commented 3 years ago

edit: unrelated ~~ auth fixed on dev but login is garbling urls eg. https://platform-ui.dev.argo.cancercollaboratory.org/file/ffaa6aa2-a69f-56f4-bdfc-0a27d93fa98b%3FisOauth%3Dtrue# because we have the file portion and an auth portion.

wrapping into this fix https://github.com/icgc-argo/platform-ui/issues/1802 ~~

ciaranschutte commented 3 years ago

https://github.com/icgc-argo/roadmap/issues/779