Skip to content

Commit

Permalink
changed driver_portal redirect to just be a 403
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanBeatty committed Jan 14, 2016
1 parent 1ecd369 commit a9d768c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions steerclear/driver_portal/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ def heartbeat():

@driver_portal_bp.route('/index')
@login_required
@admin_permission.require(http_exception=403)
def index():
if not admin_permission.can():
return redirect(url_for('.heartbeat'))
return render_template('index.html')

@driver_portal_bp.route('/privacy-policy', defaults={'path': 'index.html'})
Expand Down
2 changes: 1 addition & 1 deletion tests/driver_portal_tests/views_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ def test_get_index_admin_user(self):
def test_get_index_student_user(self):
self._login(self.student_user)
response = self.client.get(url_for('driver_portal.index'))
self.assertRedirects(response, url_for('driver_portal.heartbeat'))
self.assertEquals(response.status_code, 403)

0 comments on commit a9d768c

Please sign in to comment.