aboutsummaryrefslogtreecommitdiff
path: root/lockchain-core/src/users/rights.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lockchain-core/src/users/rights.rs')
-rw-r--r--lockchain-core/src/users/rights.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/lockchain-core/src/users/rights.rs b/lockchain-core/src/users/rights.rs
index 4404253..b9ea6cd 100644
--- a/lockchain-core/src/users/rights.rs
+++ b/lockchain-core/src/users/rights.rs
@@ -1,8 +1,12 @@
+//! Permission and access system for lockchain
+
use traits::AutoEncoder;
/// Specifies access to a resource
#[derive(Hash, Serialize, Deserialize, Clone, PartialEq, Eq)]
pub enum Access {
+ /// A key that is only used to re-encrypt sub-keys
+ Root,
/// Allows access to vault metadata & index files
Vault(Role),
/// Allows access to a record resource inside a vault
@@ -14,8 +18,11 @@ impl AutoEncoder for Access {}
/// Specifies the capabilities of a user
#[derive(Hash, Serialize, Deserialize, Clone, PartialEq, Eq)]
pub enum Role {
+ /// Only has read access
Reader,
+ /// Can edit any field in a record
Editor,
+ /// Can modify base structure, squash and delete records
Admin,
}