Skip to content

Commit

Permalink
Déjà la modif de permission_required :)
Browse files Browse the repository at this point in the history
  • Loading branch information
gllmc committed Feb 8, 2017
1 parent ca01fdd commit e39fe7b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions zds/member/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,12 +481,10 @@ def modify_profile(request, user_pk):


@login_required
@permission_required('member.change_profile', raise_exception=True)
def sanctions_history(request, user_pk):
"""Display the history of a member sanctions"""

if not request.user.has_perm('member.change_profile'):
raise PermissionDenied

user = get_object_or_404(User, pk=user_pk)

sanctions = Ban.objects.filter(user=user).order_by('-pubdate').select_related('moderator')
Expand Down

0 comments on commit e39fe7b

Please sign in to comment.