CCI-MOC / flocx-market

2 stars 9 forks source link

Scoping offer objects and generating contexts in all apis #103

Closed ljmcgann closed 5 years ago

ljmcgann commented 5 years ago

Implements checks to database api to scope calls to ensure proper access to objects. Uses oslo_context to pass a project_id to object creation, and when querying database, checks that oslo_context project_id matches with the object's project_id or that the context belongs to an admin. TG-163

codecov-io commented 5 years ago

Codecov Report

Merging #103 into master will increase coverage by 0.29%. The diff coverage is 98.76%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #103      +/-   ##
=========================================
+ Coverage   92.41%   92.7%   +0.29%     
=========================================
  Files          49      49              
  Lines        1608    1672      +64     
=========================================
+ Hits         1486    1550      +64     
  Misses        122     122
Impacted Files Coverage Δ
flocx_market/tests/unit/objects/test_object_bid.py 100% <100%> (ø) :arrow_up:
...ocx_market/tests/unit/objects/test_object_offer.py 100% <100%> (ø) :arrow_up:
flocx_market/objects/bid.py 96.96% <100%> (ø) :arrow_up:
flocx_market/objects/contract.py 95.45% <100%> (ø) :arrow_up:
flocx_market/objects/offer.py 96.96% <100%> (ø) :arrow_up:
flocx_market/api/contract.py 96.66% <100%> (ø) :arrow_up:
flocx_market/db/sqlalchemy/api.py 97.01% <100%> (+0.32%) :arrow_up:
flocx_market/api/offer.py 96.66% <100%> (ø) :arrow_up:
flocx_market/tests/unit/api/test_app_contract.py 100% <100%> (ø) :arrow_up:
flocx_market/tests/unit/api/test_app_offer.py 100% <100%> (ø) :arrow_up:
... and 6 more

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 8c76ef0...92ad036. Read the comment docs.