-
-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Need a 'graceful landing' if someone goes to a screen they don't have access to while logged in. #4511
Comments
@cielf to clarify you mean something like: I log in a partner and go to |
I think the particular error that's coming up in that case is because they don't have a 'current organization" because they are signed in as a partner. I think that's going to be the kind of thing that currently happens on most of the relevant cases, but/and they shouldn't be able to access any of the views that require org_user or org_admin status when logged in as a partner. Does that help? |
Hey all, With apologies for forging rashly ahead (I took a look at this to see if I could figure it out, and by the time I figured out I could, well, it was mostly done) I'm working on a draft for this one: #4650 I still have some tests to write, and per the reqs need to bubble up a slightly more helpful message than |
It might be a day or two before anyone has a chance to take a look at what you've done, but I've assigned it to you. |
thanks @cielf! I'll try to get the rest of my ducks in a row here meanwhile :) |
@therufs not sure I understand what's changed in that PR. As far as I can tell you renamed a method, but I don't really see how that fixes this problem? |
Summary
If someone goes to a screen they don't have access to while logged in (usually through a link they have saved), take them to their own dashboard screen, with an error message.
Why
There are several people who have multiple roles. We're frequently seeing cases in bugsnag where people are trying to go to a screen they can't access in their current role. We'd like this to be gentler than a 500 error.
Details
If someone is logged in, but attempting to access a screen they can't, redirect them to the dashboard for their current role and show an error "That screen is not available. Please switch to the correct role and try again."
Recreation
Create a new user that is both a org admin and a partner.
Log in as that user
As the org admin, go to a report, and grab the link for that.
Switch to the partner role
Go to that link
Current: you get a 500 error
Desired: redirect to the partner dashboard with the above message.
(Similarly for the opposite case where you are going to a partner page from the org admin)
Criteria for completion
The text was updated successfully, but these errors were encountered: