mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-10-31 07:49:57 +01:00 
			
		
		
		
	Update file views.py
This commit is contained in:
		| @@ -83,7 +83,9 @@ class UserUpdateView(ProtectQuerysetMixin, LoginRequiredMixin, UpdateView): | ||||
|                                             data=self.request.POST if self.request.POST else None) | ||||
|                                              | ||||
|             # Désactivation des champs non autorisés | ||||
|         for field_name in profile_form.fields: | ||||
|         fields_to_check = list(profile_form.fields.keys()) | ||||
|  | ||||
|         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] | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user