aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-10-04 20:41:59 +0200
committermetamuffin <metamuffin@disroot.org>2023-10-04 20:41:59 +0200
commit347274afb36e926b328e799ca8004fc874ffe4cb (patch)
tree8c7ec38938e3673ce5752bffa9442daa9f589f3d /common
parent4095a8804c17c3ec12706f00d3694f564afc0b95 (diff)
downloadjellything-347274afb36e926b328e799ca8004fc874ffe4cb.tar
jellything-347274afb36e926b328e799ca8004fc874ffe4cb.tar.bz2
jellything-347274afb36e926b328e799ca8004fc874ffe4cb.tar.zst
more permission stuff
Diffstat (limited to 'common')
-rw-r--r--common/src/lib.rs3
-rw-r--r--common/src/user.rs2
2 files changed, 4 insertions, 1 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs
index c425c21..2bde0b9 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -37,7 +37,8 @@ pub struct NodePrivate {
pub struct NodePublic {
pub kind: NodeKind,
pub title: String,
- #[serde(default)] pub parent: Option<String>,
+ #[serde(default)] pub id: Option<String>,
+ #[serde(default)] pub path: Vec<String>,
#[serde(default)] pub children: Vec<String>,
#[serde(default)] pub tagline: Option<String>,
#[serde(default)] pub description: Option<String>,
diff --git a/common/src/user.rs b/common/src/user.rs
index 8640dc2..b049346 100644
--- a/common/src/user.rs
+++ b/common/src/user.rs
@@ -20,6 +20,7 @@ pub enum UserPermission {
OriginalStream,
Transcode,
ManageUsers,
+ FederatedContent,
GenerateInvite,
AccessNode(String),
}
@@ -38,6 +39,7 @@ impl UserPermission {
impl Display for UserPermission {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(&match self {
+ UserPermission::FederatedContent => format!("access to federated content"),
UserPermission::Admin => format!("administrative rights"),
UserPermission::OriginalStream => format!("download of the original media"),
UserPermission::Transcode => format!("transcoding"),