mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 01:12:08 +01:00 
			
		
		
		
	[WEI] Fix permission check for information json
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
		@@ -704,7 +704,8 @@ class WEIUpdateRegistrationView(ProtectQuerysetMixin, LoginRequiredMixin, Update
 | 
			
		||||
    def get_form(self, form_class=None):
 | 
			
		||||
        form = super().get_form(form_class)
 | 
			
		||||
        form.fields["user"].disabled = True
 | 
			
		||||
        if not self.object.first_year:
 | 
			
		||||
        # The auto-json-format may cause issues with the default field remove
 | 
			
		||||
        if not PermissionBackend.check_perm(self.request, 'wei.change_weiregistration_information_json', self.object):
 | 
			
		||||
            del form.fields["information_json"]
 | 
			
		||||
        return form
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user