mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-02-11 18:51:19 +00:00
Update file views.py
This commit is contained in:
parent
bcf21507e5
commit
eee87dcf13
@ -85,7 +85,7 @@ class UserUpdateView(ProtectQuerysetMixin, LoginRequiredMixin, UpdateView):
|
||||
# Désactivation des champs non autorisés
|
||||
for field_name in profile_form.fields:
|
||||
if not PermissionBackend.check_perm(self.request, f"member.change_profile_{field_name}", context['user_object'].profile):
|
||||
profile_form.fields[field_name].widget.attrs['disabled'] = True
|
||||
del profile_form.fields[field_name]
|
||||
|
||||
context['profile_form'] = profile_form
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user