X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/6d66ceff54d470d238250c73ab484d496bf296db..7f3f79476a57d10991566c511d40e20154c01064:/apps/explorer/views.py?ds=sidebyside diff --git a/apps/explorer/views.py b/apps/explorer/views.py index 82376fc1..124a5743 100644 --- a/apps/explorer/views.py +++ b/apps/explorer/views.py @@ -147,6 +147,14 @@ def _get_issues_for_file(fileid): # ================= # = Pull requests = # ================= -#def pull_requests(request): -# return direct_to_template(request, 'manager/pull_request.html', extra_context = { -# 'objects': models.PullRequest.objects.all()} ) +def pull_requests(request): + from explorer.models import PullRequest + + objects = PullRequest.objects.order_by('status') + + if not request.user.has_perm('explorer.book.can_share'): + objects = objects.filter(comitter=request.user) + + + return direct_to_template(request, 'manager/pull_request.html', + extra_context = {'objects': objects} )