Skip to content

Commit

Permalink
Add a SharePolicy
Browse files Browse the repository at this point in the history
Problem: we announce documents to all connected peers and we share
documents with anyone who knows the document ID. Most applications
probably want some control over authorization.

Solution: introduce `SharePolicy`, which is a trait users implement and
pass to `Repo::with_share_policy` to control when documents are shared.
  • Loading branch information
alexjg committed Dec 1, 2023
1 parent ed398f3 commit 977d54d
Show file tree
Hide file tree
Showing 5 changed files with 655 additions and 102 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ mod interfaces;
mod message;
mod network_connect;
mod repo;
pub mod share_policy;
pub use share_policy::{SharePolicy, SharePolicyError};

pub use crate::dochandle::DocHandle;
pub use crate::interfaces::{
Expand Down
Loading

0 comments on commit 977d54d

Please sign in to comment.