X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/3193141f55df20910cf8ba35f9e669d79c90d3f4..5a8f55e2911b9a6aa38499da2c54b6068152f1cf:/apps/api/handlers/manage_handlers.py?ds=inline diff --git a/apps/api/handlers/manage_handlers.py b/apps/api/handlers/manage_handlers.py index 5905724f..df32b8b5 100644 --- a/apps/api/handlers/manage_handlers.py +++ b/apps/api/handlers/manage_handlers.py @@ -18,7 +18,7 @@ class PullRequestListHandler(BaseHandler): allowed_methods = ('GET',) def read(self, request): - if request.user.has_perm('api.pullrequest.can_change'): + if request.user.has_perm('change_pullrequest'): return PullRequest.objects.all() else: return PullRequest.objects.filter(commiter=request.user) @@ -33,7 +33,7 @@ class PullRequestHandler(BaseHandler): def update(self, request, prq_id): """Change the status of request""" - if not request.user.has_perm('api.pullrequest.can_change'): + if not request.user.has_perm('change_pullrequest'): return AccessDenied().django_response("Insufficient priviliges") prq = PullRequest.objects.get(id=prq_id)