From 00dab1265b83e05450b2cd61e96af43df530c919 Mon Sep 17 00:00:00 2001 From: Josue Kouka Date: Fri, 29 Jan 2016 16:14:43 +0100 Subject: [PATCH] fix typo authentication_class in RolesAPI --- src/authentic2/api_views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/authentic2/api_views.py b/src/authentic2/api_views.py index 1ca830f..69857f5 100644 --- a/src/authentic2/api_views.py +++ b/src/authentic2/api_views.py @@ -330,7 +330,7 @@ router = SimpleRouter() router.register(r'users', UsersAPI, base_name='a2-api-users') class RolesAPI(APIView): - authentication_class = (authentication.BasicAuthentication) + authentication_classes = (authentication.BasicAuthentication,) permission_classes = (permissions.IsAuthenticated,) def initial(self, request, *args, **kwargs): @@ -343,7 +343,7 @@ class RolesAPI(APIView): perm = 'a2_rbac.change_role' authorized = request.user.has_perm(perm, obj=self.role) if not authorized: - raise PermissionDenied(u'User not allowed to change role') + raise PermissionDenied(u'User not allowed to change role') def post(self, request, *args, **kwargs): self.role.members.add(self.member) @@ -354,3 +354,4 @@ class RolesAPI(APIView): return Response({'detail': _('User successfully removed from role')}, status= status.HTTP_200_OK) roles = RolesAPI.as_view() + -- 2.7.0.rc3