mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-12-22 15:32:22 +00:00
Display true note name next to the alias, whenever the user has low permissions
This commit is contained in:
parent
9da8d49223
commit
a5e50e5de6
@ -119,7 +119,7 @@ class ConsumerSerializer(serializers.ModelSerializer):
|
||||
# If the user has no right to see the note, then we only display the note identifier
|
||||
if PermissionBackend.check_perm(get_current_authenticated_user(), "note.view_note", obj.note):
|
||||
return NotePolymorphicSerializer().to_representation(obj.note)
|
||||
return dict(id=obj.note.id)
|
||||
return dict(id=obj.note.id, name=str(obj.note))
|
||||
|
||||
def get_email_confirmed(self, obj):
|
||||
if isinstance(obj.note, NoteUser):
|
||||
|
Loading…
Reference in New Issue
Block a user