-
-
Notifications
You must be signed in to change notification settings - Fork 448
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
3686 reroute user to error page fix #3974
3686 reroute user to error page fix #3974
Conversation
…s a partner they will be redirected to the partner users dashboard with an error message telling them they must be logged in as an org user to approve a new partner.
…d fixed tests accordingly. Added tests for redirect and warning if a partner clicks the review partner link from email
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking better - still need to make one change!
@@ -164,6 +165,13 @@ def reactivate | |||
|
|||
private | |||
|
|||
def validate_user_role | |||
if current_user.kind == 'partner' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work, because a user can have roles both as a partner and an org admin. You need to check current_role
to determine what the user is currently logged in as, and base it off of that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh got ya. Change has been made along with 2 changes from the ruby linter. Should be good to go now.
…ole and 2 small changes based on ruby linter
Looks good - thanks! |
@thebkbuffalo: Your PR |
Resolves #3686
Description
Gracefully handles error when a partner clicks the Review This Partner link from email. User is taken to partners root path (dashboard) with an error message stating they must be logged in as an org admin to approve a partner application.
Please also include relevant motivation and context.
Guide questions:
List any dependencies that are required for this change. (gems, js libraries, etc.)
Include anything else we should know about. -->
Type of change
How Has This Been Tested?
Yes.
Screenshots