Projet

Général

Profil

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

Josué Kouka, 29 janvier 2016 16:15

Télécharger (1,25 ko)

Voir les différences:

Subject: [PATCH] fix typo authentication_class in RolesAPI

 src/authentic2/api_views.py | 4 ++--
 1 file changed, 2 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)
350
-