-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
[Bug] Fix nasty error when clicking on partner approval request email as partner #3686
Comments
I can work on this |
Hey @zeeshan-haidar - did you want this one or #3707 ? |
All righty - good luck! |
This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned. |
This issue is in progress, already created PR |
guh not sure why the bot is marking it as stale when the PR had changes 😦 |
This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned. |
Automatically unassigned after 7 days of inactivity. |
I can pick this ticket up. |
Go for it! |
@dorner quick question! I'm new to this app and not sure what is the correct page to be displayed. Can you add some info on that? Thank you! |
@thebkbuffalo I'd take a look at the original (now apparently abandoned) PR as a place to start looking: #3759 |
@dorner - question for you. I'm working out how data is associated, and have sorted out whats breaking here, but not sure the right way to fix it. These new Partners getting created don't have an associated Organization via roles (they only have Partner roles, not org roles) which is what's breaking links created on the |
Partners all are associated with an organization (it's a 1-to-many, not many-to-many relationship). Partners themselves don't have roles, only partner users. So it would be partner user -> partner (via role) -> organization. |
Sorry I mistyped in my last comment. I understand the association between Partners and Organizations. The question I was trying to get to was more about the association between Users and Organizations. The users created during the new partner creation process don't have any associated roles that correspond to organizations. So when the user clicks the Review Organization link, what's breaking is calling So my real question is, should that association from User to Organization via Roles exist for these new Users whose only role is as a Partner? If so, then during the Partner creation process that Role needs to be created as well for the User. If not, may have to modify how we get that Organization data in the sidebar view. Thank you again for the help! |
created a PR fixing this bug. |
Created a new PR with correct fix. |
Summary
Fix this: If you are signed in as a partner, and you click on the link in the partner approval request email, it throws an unhandled exception
Why?
This (or at least something very similar to it) has happened in production to several different users in the last month. I know, it doesn't sound like standard behaviour, but let's eliminate this cause.
Details
Handle the error, showing a message like "You must be logged in as the essentials bank's organization administrator to approve partner applications"
Recreation
On your local:
This will give you an error like this:
Other things to consider
This probably also happens if you are logged in as an org_user. (That's a more likely scenario.)
Major hint!
If you add the role id (for the org_admin) to the link in the email, then you can change the controller to validate that role id and switch to it before continuing.
Criteria for Completion
The text was updated successfully, but these errors were encountered: