🐛 (backend) compute ancestor_links in get_abilities if needed
The refactor made in the tree view caching the ancestors_links to not compute them again in the document.get_abilities method lead to a bug. If the get_abilities method is called without ancestors_links, then they are computed on all the ancestors but not from the highest readable ancestor for the current user. We have to compute them with this constraint.
Showing
- CHANGELOG.md 4 additions, 0 deletionsCHANGELOG.md
- src/backend/core/api/viewsets.py 14 additions, 2 deletionssrc/backend/core/api/viewsets.py
- src/backend/core/models.py 27 additions, 1 deletionsrc/backend/core/models.py
- src/backend/core/tests/documents/test_api_documents_retrieve.py 1 addition, 1 deletion...ckend/core/tests/documents/test_api_documents_retrieve.py
- src/backend/core/tests/test_models_documents.py 44 additions, 0 deletionssrc/backend/core/tests/test_models_documents.py
Loading
Please register or sign in to comment