mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 09:12:11 +01:00 
			
		
		
		
	With normal rights, notes were displayed as there were inactive
This commit is contained in:
		@@ -127,7 +127,12 @@ class ConsumerSerializer(serializers.ModelSerializer):
 | 
				
			|||||||
        # If the user has no right to see the note, then we only display the note identifier
 | 
					        # If the user has no right to see the note, then we only display the note identifier
 | 
				
			||||||
        return NotePolymorphicSerializer().to_representation(obj.note)\
 | 
					        return NotePolymorphicSerializer().to_representation(obj.note)\
 | 
				
			||||||
            if PermissionBackend.check_perm(get_current_authenticated_user(), "note.view_note", obj.note)\
 | 
					            if PermissionBackend.check_perm(get_current_authenticated_user(), "note.view_note", obj.note)\
 | 
				
			||||||
            else dict(id=obj.note.id, name=str(obj.note))
 | 
					            else dict(
 | 
				
			||||||
 | 
					            id=obj.note.id,
 | 
				
			||||||
 | 
					            name=str(obj.note),
 | 
				
			||||||
 | 
					            is_active=obj.note.is_active,
 | 
				
			||||||
 | 
					            display_image=obj.note.display_image.url,
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_email_confirmed(self, obj):
 | 
					    def get_email_confirmed(self, obj):
 | 
				
			||||||
        if isinstance(obj.note, NoteUser):
 | 
					        if isinstance(obj.note, NoteUser):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user