Skip to content

Commit

Permalink
Merge pull request #83 from ml-tooling/fix/support-base-url
Browse files Browse the repository at this point in the history
Add missing base_url prefix to links for correct routing
  • Loading branch information
leportella authored Feb 20, 2020
2 parents a0c0810 + bc08543 commit 3ce00d3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion nativeauthenticator/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class ChangeAuthorizationHandler(LocalBase):
@admin_only
async def get(self, slug):
UserInfo.change_authorization(self.db, slug)
self.redirect('/authorize')
self.redirect(self.hub.base_url + 'authorize')


class ChangePasswordHandler(LocalBase):
Expand Down
4 changes: 2 additions & 2 deletions nativeauthenticator/templates/autorization-area.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h1>Authorization Area</h1>
<td>{{ user.has_2fa }}</td>
<td>Yes</td>
<td>
<a class="btn btn-default" href="/hub/authorize/{{ user.username }}" role="button">Unauthorize</a>
<a class="btn btn-default" href="{{ base_url }}authorize/{{ user.username }}" role="button">Unauthorize</a>
</td>
{% else %}
<tr>
Expand All @@ -35,7 +35,7 @@ <h1>Authorization Area</h1>
<td>{{ user.has_2fa }}</td>
<td>No</td>
<td>
<a class="btn btn-jupyter" href="/hub/authorize/{{ user.username }}" role="button">Authorize</a>
<a class="btn btn-jupyter" href="{{ base_url }}authorize/{{ user.username }}" role="button">Authorize</a>
</td>
{% endif %}
</tr>
Expand Down
2 changes: 1 addition & 1 deletion nativeauthenticator/templates/native-login.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
{% endif %}
<input type="submit" id="login_submit" class='btn btn-jupyter' value='Sign In' tabindex="3" />
<div style="padding-top: 25px;">
<p>Don't have an user? <a href="/signup">Signup!</a></p>
<p>Don't have an user? <a href="{{ base_url }}signup">Signup!</a></p>
</div>
</div>
</form>
Expand Down
2 changes: 1 addition & 1 deletion nativeauthenticator/templates/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
{% endif %}
<input type="submit" id="signup_submit" class='btn btn-jupyter' value='Create User' tabindex="3" />
<div style="padding-top: 25px;">
Already have an user? <a href="/login">Login!</a>
Already have an user? <a href="{{ base_url }}login">Login!</a>
</div>
{% if alert %}
<div class="alert {{alert}}" style="margin-top: 15px;" role="alert">
Expand Down

0 comments on commit 3ce00d3

Please sign in to comment.