Browse Source

Don't hardcode app.getsentry.com as SSO url (#3857)

Fixes GH-3856
Matt Robenolt 8 years ago
parent
commit
e4d49cc823
2 changed files with 3 additions and 1 deletions
  1. 1 1
      src/sentry/templates/sentry/login.html
  2. 2 0
      src/sentry/web/frontend/auth_login.py

+ 1 - 1
src/sentry/templates/sentry/login.html

@@ -65,7 +65,7 @@
         <div class="control-group">
           <div class="controls">
             <label style="display: block">SSO URL</label>
-            <span style="padding: 7px 0; font-size: 15px">app.getsentry.com/</span> <input style="width: 240px; margin: 0 0 4px; padding: 5px 8px; display: inline" type="text" class="form-control" name="organization" placeholder="acme">
+            <span style="padding: 7px 0; font-size: 15px">{{ server_hostname }}/</span> <input style="width: 240px; margin: 0 0 4px; padding: 5px 8px; display: inline" type="text" class="form-control" name="organization" placeholder="acme">
             <p class="help-block">Enter your organization's ID and we'll get things started.</p>
           </div>
         </div>

+ 2 - 0
src/sentry/web/frontend/auth_login.py

@@ -10,6 +10,7 @@ from django.views.decorators.cache import never_cache
 
 from sentry import features
 from sentry.constants import WARN_SESSION_EXPIRED
+from sentry.http import get_server_hostname
 from sentry.models import AuthProvider, Organization, OrganizationStatus
 from sentry.web.forms.accounts import AuthenticationForm, RegistrationForm
 from sentry.web.frontend.base import BaseView
@@ -117,6 +118,7 @@ class AuthLoginView(BaseView):
 
         context = {
             'op': op or 'login',
+            'server_hostname': get_server_hostname(),
             'login_form': login_form,
             'register_form': register_form,
             'CAN_REGISTER': can_register,