From b0a87ee8d07a54b60de85dddaddee01c72175a01 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 11 Jan 2024 10:06:08 -0800 Subject: [PATCH] Move comment for better understanding --- peer/cwtch_peer.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/peer/cwtch_peer.go b/peer/cwtch_peer.go index b0dd928..d378dd4 100644 --- a/peer/cwtch_peer.go +++ b/peer/cwtch_peer.go @@ -313,12 +313,14 @@ func (cp *cwtchPeer) GenerateProtocolEngine(acn connectivity.ACN, bus event.Mana if tor.IsValidHostname(conversation.Handle) { + // if this profile does not have an ACL version, and the profile is accepted, then migrate + // the permissions to the v1 ACL + // migrate the old accepted AC to a new fine-grained one + // we only do this for previously trusted connections + // NOTE: this does not supercede global cwthch experiments settings + // if share files is turned off globally then acl.ShareFiles will be ignored. if _, exists := conversation.GetAttribute(attr.LocalScope, attr.ProfileZone, constants.ACLVersion); !exists { if conversation.Accepted { - // migrate the old accepted AC to a new fine-grained one - // we only do this for previously trusted connections - // NOTE: this does not supercede global cwthch experiments settings - // if share files is turned off globally then acl.ShareFiles will be ignored. if ac, exists := conversation.ACL[conversation.Handle]; exists { ac.ShareFiles = true ac.RenderImages = true