Skip to content
Snippets Groups Projects
Commit b63fa196 authored by ynerant's avatar ynerant
Browse files

With normal rights, notes were displayed as there were inactive

parent 00bc9550
No related branches found
No related tags found
1 merge request!113Fix note pictures, better ansible
Pipeline #8650 passed with warnings with stages
in 10 minutes and 13 seconds
......@@ -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
return NotePolymorphicSerializer().to_representation(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):
if isinstance(obj.note, NoteUser):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment