зеркало из https://github.com/mozilla/kitsune.git
@login_required for forums dashboard. [bug 653012]
This commit is contained in:
Родитель
14082a43f5
Коммит
060ff48442
|
@ -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',
|
||||
|
|
Загрузка…
Ссылка в новой задаче