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
9635004520
commit
6ceb43cb66
@ -83,7 +83,7 @@ class UserUpdateView(ProtectQuerysetMixin, LoginRequiredMixin, UpdateView):
|
||||
# Delete the fields for which the user does not have the permission to modify
|
||||
for field_name in fields_to_check:
|
||||
if not PermissionBackend.check_perm(self.request, f"member.change_profile_{field_name}", context['user_object'].profile):
|
||||
del profile_form.fields[field_name]
|
||||
profile_form.fields[field_name].widget.attrs['disabled'] = True
|
||||
|
||||
context['profile_form'] = profile_form
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user