hmpf / easydmp

MIT License
7 stars 2 forks source link

Ensure admin cannot change published templates #211

Closed hmpf closed 3 years ago

hmpf commented 3 years ago

Changing a published template may invalidate the plans built on it, so protect the templates.

codecov[bot] commented 3 years ago

Codecov Report

Merging #211 (9a71cd3) into master (420dff0) will decrease coverage by 0.05%. The diff coverage is 52.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #211      +/-   ##
==========================================
- Coverage   56.05%   55.99%   -0.06%     
==========================================
  Files          88       88              
  Lines        6223     6252      +29     
==========================================
+ Hits         3488     3501      +13     
- Misses       2735     2751      +16     
Impacted Files Coverage Δ
src/easydmp/dmpt/admin.py 49.54% <47.36%> (-0.94%) :arrow_down:
src/easydmp/dmpt/models.py 57.43% <60.00%> (+0.02%) :arrow_up:

Continue to review full report at Codecov.

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

hmpf commented 3 years ago

I have not decided what is the best way to look up readonlyhood and usage from Template's dependents: recursively, as in is_readonly, or explicitly, as in in_use.