🐛(backend) use computed_link_reach in handle_onboarding_document

In the model method User::_handle_onboarding_documents_access we do not
allow using documents with restricted link_reach to be added as
onboarding documents. To check the real link_reach of the document, we
must use instead the computed_link_reach to be sure that a sub document
can also be used and compute its correct link_reach.
This commit is contained in:
Manuel Raynaud
2026-05-28 06:50:40 +00:00
committed by GitHub
parent fdc99adc78
commit a20ba1a78e
3 changed files with 21 additions and 1 deletions
+1 -1
View File
@@ -244,7 +244,7 @@ class User(AbstractBaseUser, BaseModel, auth_models.PermissionsMixin):
)
continue
if document.link_reach == LinkReachChoices.RESTRICTED:
if document.computed_link_reach == LinkReachChoices.RESTRICTED:
logger.warning(
"Onboarding on a restricted document is not allowed. Must be public or "
"connected. Restricted document: %s",