OpenContracts icon indicating copy to clipboard operation
OpenContracts copied to clipboard

Permissioning and Initial Sharing

Open JSv4 opened this issue 11 months ago • 1 comments

Revamped permissioning logic to rely on Django Guardian more thoroughly and to pass corpus permissions through to child objects. Added test for queries and nested objects on corpuses.

JSv4 avatar Mar 08 '25 07:03 JSv4

Codecov Report

Attention: Patch coverage is 84.32000% with 98 lines in your changes missing coverage. Please review.

Project coverage is 89.17%. Comparing base (9a97509) to head (ea209e8). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
opencontractserver/utils/permissioning.py 83.03% 48 Missing :warning:
opencontractserver/shared/resolvers.py 18.51% 22 Missing :warning:
opencontractserver/annotations/models.py 23.07% 10 Missing :warning:
opencontractserver/shared/mixins.py 66.66% 6 Missing :warning:
opencontractserver/shared/Models.py 73.33% 4 Missing :warning:
opencontractserver/shared/QuerySets.py 71.42% 4 Missing :warning:
...server/users/migrations/0015_auto_20250308_0649.py 92.00% 2 Missing :warning:
opencontractserver/llms/vector_stores.py 90.90% 1 Missing :warning:
opencontractserver/shared/Managers.py 90.00% 1 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #330      +/-   ##
==========================================
- Coverage   89.63%   89.17%   -0.46%     
==========================================
  Files         261      264       +3     
  Lines       10515    10977     +462     
==========================================
+ Hits         9425     9789     +364     
- Misses       1090     1188      +98     
Files with missing lines Coverage Δ
opencontractserver/corpuses/models.py 92.38% <100.00%> (+0.14%) :arrow_up:
opencontractserver/documents/models.py 98.71% <100.00%> (+0.03%) :arrow_up:
...pencontractserver/tests/test_corpus_permissions.py 100.00% <100.00%> (ø)
...ractserver/tests/test_custom_permission_filters.py 100.00% <100.00%> (ø)
...contractserver/tests/test_document_analysis_row.py 100.00% <100.00%> (ø)
...ontractserver/tests/test_permissioned_querysets.py 100.00% <100.00%> (ø)
opencontractserver/tests/test_permissioning.py 100.00% <100.00%> (ø)
opencontractserver/llms/vector_stores.py 73.33% <90.90%> (+0.39%) :arrow_up:
opencontractserver/shared/Managers.py 61.29% <90.00%> (+2.03%) :arrow_up:
...server/users/migrations/0015_auto_20250308_0649.py 92.00% <92.00%> (ø)
... and 6 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9a97509...ea209e8. Read the comment docs.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Mar 09 '25 00:03 codecov[bot]