Skip to content

Commit

Permalink
Empêche un membre non staff d'éditer le profil d'un autre membre (#4041)
Browse files Browse the repository at this point in the history
* Empêche un membre non staff d'éditer le profil d'un autre membre

* Correction

* PEP-8
  • Loading branch information
Guillaume authored and vhf committed Dec 8, 2016
1 parent c649be8 commit 6a1033b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zds/member/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,9 @@ def articles(request):
def settings_mini_profile(request, user_name):
"""Minimal settings of users for staff."""

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

# extra information about the current user
profile = get_object_or_404(Profile, user__username=user_name)
if request.method == "POST":
Expand Down

0 comments on commit 6a1033b

Please sign in to comment.