@login_required for forums dashboard. [bug 653012]

This commit is contained in:
Ricky Rosario 2011-04-29 11:07:34 -04:00
Родитель 14082a43f5
Коммит 060ff48442
2 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -115,6 +115,14 @@ class ContributorForumDashTests(TestCase):
doc = pq(response.content)
eq_(1, len(doc('ol.actions li')))
def test_anonymous_user(self):
"""Checks the forums dashboard doesn't load for an anonymous user."""
self.client.logout()
response = self.client.get(reverse('dashboards.review',
locale='en-US'))
eq_(302, response.status_code)
assert '/users/login' in response['location']
class AnnouncementForumDashTests(TestCase):
fixtures = ['users.json']

Просмотреть файл

@ -83,6 +83,7 @@ def wiki_rows(request, readout_slug):
@require_GET
@login_required
def review(request):
"""Review dashboard for a user, includes activity, announcements, etc."""
return jingo.render(request, 'dashboards/review.html',