Skip to content
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

Fix verification_email endpoint when in MULTI_ORG mode #3502

Merged
merged 5 commits into from
Mar 2, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/app/pages/home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ function HomeCtrl(Events, Dashboard, Query, $http, currentUser, toastr) {
});

this.verifyEmail = () => {
$http.post('/verification_email/').success(({ message }) => {
const slug = currentUser.org_slug ? `/${currentUser.org_slug}` : '';
$http.post(`${slug}/verification_email/`).success(({ message }) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use verification_email/ and let the <base href> meta tag do its thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂

toastr.success(message);
});
};
Expand Down
3 changes: 2 additions & 1 deletion redash/handlers/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ def session(org_slug=None):
'email': current_user.email,
'groups': current_user.group_ids,
'permissions': current_user.permissions,
'is_email_verified': current_user.is_email_verified
'is_email_verified': current_user.is_email_verified,
'org_slug': current_user.org.slug if settings.MULTI_ORG else None,
}

return json_response({
Expand Down