Projet

Général

Profil

0001-fix-typo-authentication_class-in-RolesAPI.patch

Josué Kouka, 29 janvier 2016 17:41

Télécharger (1,43 ko)

Voir les différences:

Subject: [PATCH] fix typo authentication_class in RolesAPI

 src/authentic2/api_views.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
src/authentic2/api_views.py
330 330
router.register(r'users', UsersAPI, base_name='a2-api-users')
331 331

  
332 332
class RolesAPI(APIView):
333
    authentication_class = (authentication.BasicAuthentication)
333
    authentication_classes = (authentication.BasicAuthentication,)
334 334
    permission_classes = (permissions.IsAuthenticated,)
335 335

  
336 336
    def initial(self, request, *args, **kwargs):
......
343 343
        perm = 'a2_rbac.change_role'
344 344
        authorized = request.user.has_perm(perm, obj=self.role)
345 345
        if not authorized:
346
            raise PermissionDenied(u'User not allowed to change role') 
346
            raise PermissionDenied(u'User not allowed to change role')
347 347

  
348 348
    def post(self, request, *args, **kwargs):
349 349
        self.role.members.add(self.member)
......
354 354
        return Response({'detail': _('User successfully removed from role')}, status= status.HTTP_200_OK)
355 355

  
356 356
roles = RolesAPI.as_view()
357

  
357
-