Skip to content

Commit

Permalink
append slug to /verification_email endpoint when in MULTI_ORG mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Omer Lachish committed Feb 27, 2019
1 parent 0d76c03 commit 817fb03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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 }) => {
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

0 comments on commit 817fb03

Please sign in to comment.