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
bfd865b3e3
commit
056c4029f8
@ -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):
|
||||
profile_form.fields[field_name].widget.attrs['readonly'] = True
|
||||
profile_form.fields[field_name].widget = forms.HiddenInput()
|
||||
|
||||
context['profile_form'] = profile_form
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user