Refactor crashreport stats view permissions
Align authorization permissions with the rest of the stats API:
Not only users of the correct group are authorized but also admin
users.
This change fixes some tests that now do not need to be skipped
anymore.
Issue: HIC-204
Change-Id: If82b9156e84f78f8dbe7c1a930c7bf8c3941e7e2
diff --git a/crashreport_stats/tests/utils.py b/crashreport_stats/tests/utils.py
index 983a976..f1b9d92 100644
--- a/crashreport_stats/tests/utils.py
+++ b/crashreport_stats/tests/utils.py
@@ -338,7 +338,7 @@
"somebody", "somebody@example.com", "thepassword"
)
cls.admin = APIClient()
- cls.admin.force_authenticate(admin_user)
+ cls.admin.force_login(admin_user)
fp_staff_group = Group(name=FP_STAFF_GROUP_NAME)
fp_staff_group.save()