1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! Collaboration control for Weirdnet apps.
//!
//! A [`Project`] holds who is in it ([`Member`] with a [`RoleId`]), signed allow and deny
//! [`Rule`]s for a person or a role, owner [`ConsentGrant`]s, [`Invite`]s and a signed
//! [`AuditLog`]. [`Project::decide`] answers "may this person do this?" with an
//! [`Explained`] decision: the answer and the chain of steps that led to it, built by running
//! the rules themselves, so the same inputs give the same chain.
//!
//! The evaluation order is fixed:
//!
//! 1. Identity and membership: a banned identity or a non-member is denied, and a closed
//! session denies everything except managing it.
//! 2. A rule for the person, then a rule for their role. Within one level a deny beats an
//! allow, and expired rules are ignored (and shown in the chain).
//! 3. The role's default.
//! 4. Extra gates the host cannot grant or waive: the audio owner's consent
//! ([`Gate::OwnerConsent`]), or a switch only the person's device can check
//! ([`Gate::Local`]).
//! 5. Default deny.
//!
//! Permissions stop at the project: there is no narrower level. Only owner consent looks at a
//! single stream. The crate is app-neutral: the app supplies the [`RoleTable`] (roles, their
//! permissions, who may invite as which role, which permissions are gated); weirdnet-songnotes
//! is one such app layer.
//!
//! Every record is signed over a fixed binary layout by the person who made it, and a record
//! from another node is checked before it is kept (`accept_*`). An identity is a
//! [`weirdnet_contacts::UserId`].
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;