mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-24 02:25:08 +02:00
🐛(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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user