IN-CORE / incore-ui

IN-CORE Web Tools: a component of IN-CORE. It consists of data viewer, hazard viewer, and fragility viewer.
https://incore.ncsa.illinois.edu
Mozilla Public License 2.0
4 stars 0 forks source link

206 restrict a user in a particular user group from performing or accessing anything #207

Closed longshuicy closed 3 weeks ago

longshuicy commented 2 months ago

Ready to be reviewed:

This PR catches all the 403 error (which is the backend response when a user doesn't belong to any group) and redirect to a forbidden page; forbids user from any actions.


To Test:

  1. npm run start:dev
  2. Login with username: testuser2, password: {contact developer} --> this is a special user that doesn't belong to any group
  3. Try to go to any viewers and profile page would direct to the forbidden page
  4. Landing page stays the same
image
Rashmil-1999 commented 1 month ago

When I try to go to Jupyterhub, it still gives me this blank screen error.

longshuicy commented 1 month ago

When I try to go to Jupyterhub, it still gives me this blank screen error.

I deployed this to dev. On dev, when you go to jupyterhub with a unauthorized user, the jupyter hub gives below error

image

But this part is related to Jupyter's authenticator; frontend don't have much to do with it.

Rashmil-1999 commented 1 month ago

Ahh I see... Let me review it ... :)