Navigation Menu

Skip to content

Commit

Permalink
Dont bother rendering status at all if they dont have access
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Jan 15, 2012
1 parent 6fa9d41 commit 5376454
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 0 additions & 6 deletions sentry/templates/sentry/status.html
Expand Up @@ -8,11 +8,6 @@
{% block heading %}{% trans "Status" %}{% endblock %}

{% block content %}
{% if restricted %}
<div class="span16">
<div class="alert-message notice">Restricted to administrators.</div>
</div>
{% else %}
<div class="span16">
<ul class="tabs" data-tabs="tabs">
<li class="active"><a href="#main">{% trans "Environment" %}</a></li>
Expand Down Expand Up @@ -203,5 +198,4 @@ <h2>{{ conf.site_config_title|default:conf.title }} configuration</h2>
{% endfor %}
</div>
</div>
{% endif %}
{% endblock %}
4 changes: 1 addition & 3 deletions sentry/web/frontend/generic.py
Expand Up @@ -38,9 +38,7 @@ def status(request):
from sentry.processors import Processor

if not request.user.is_staff:
return render_to_response('sentry/status.html', {
'restricted': True,
}, request)
return HttpResponseRedirect(reverse('sentry'))

# Deal with the plugins
site_configs = []
Expand Down

0 comments on commit 5376454

Please sign in to comment.