0001-fix-typo-authentication_class-in-RolesAPI.patch
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 |
- |