ConsenSysMesh / Stow-Smart-Contracts

Formerly Linnia-Smart-Contracts
https://stow-protocol.com/
MIT License
56 stars 39 forks source link

feat/policiesForRecords #108

Open MaxBlaushild opened 5 years ago

MaxBlaushild commented 5 years ago

Implements policy constrained record appending and persistent record based policies.

Users now have the option to check against policies when appending data. These policies are stored, and again checked when user grants access for file to new users.

Also allows users to add and remove policies for their records.

codecov-io commented 5 years ago

Codecov Report

Merging #108 into master will decrease coverage by 1.84%. The diff coverage is 87.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #108      +/-   ##
==========================================
- Coverage    96.6%   94.75%   -1.85%     
==========================================
  Files           8        9       +1     
  Lines         206      248      +42     
  Branches       48       57       +9     
==========================================
+ Hits          199      235      +36     
- Misses          7       13       +6
Impacted Files Coverage Δ
contracts/mock/PolicyMock.sol 100% <ø> (ø)
contracts/LinniaPermissions.sol 98.03% <100%> (-0.18%) :arrow_down:
contracts/LinniaHub.sol 95.45% <100%> (+1.33%) :arrow_up:
contracts/LinniaPolicies.sol 80% <80%> (ø)
contracts/LinniaRecords.sol 97.11% <90.9%> (-1.67%) :arrow_down:

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 9f2b1a5...ad50229. Read the comment docs.

godfreyhobbs commented 5 years ago

consider adding the following to the 3_records_test.js and 5_records-token_test.js

  beforeEach('set up a LinniaPolicies contract', async () => {
    policiesInstance = await LinniaPolicies.new(hub.address);
    await hub.setPoliciesContract(policiesInstance.address);
  });