mirror of https://github.com/buster-so/buster.git
last few changes
This commit is contained in:
parent
95e3dcfe80
commit
a1f5fe6e2a
|
@ -256,6 +256,7 @@ pub async fn get_user_collection_permission(
|
|||
AssetPermissionRole::Owner => 3,
|
||||
AssetPermissionRole::Editor => 2,
|
||||
AssetPermissionRole::Viewer => 1,
|
||||
_ => 0,
|
||||
})
|
||||
.ok_or_else(|| anyhow!("No collection found with permissions"))?;
|
||||
|
||||
|
@ -376,6 +377,7 @@ async fn get_collection_and_check_permissions(
|
|||
AssetPermissionRole::Owner => 3,
|
||||
AssetPermissionRole::Editor => 2,
|
||||
AssetPermissionRole::Viewer => 1,
|
||||
_ => 0,
|
||||
})
|
||||
.ok_or_else(|| anyhow!("No collection found with permissions"))?;
|
||||
|
||||
|
|
|
@ -283,6 +283,7 @@ pub async fn get_user_dashboard_permission(
|
|||
AssetPermissionRole::Owner => 3,
|
||||
AssetPermissionRole::Editor => 2,
|
||||
AssetPermissionRole::Viewer => 1,
|
||||
_ => 0,
|
||||
})
|
||||
.ok_or_else(|| anyhow!("No dashboard found with permissions"))?;
|
||||
|
||||
|
|
|
@ -221,6 +221,7 @@ pub async fn get_user_thread_permission(
|
|||
AssetPermissionRole::Owner => 3,
|
||||
AssetPermissionRole::Editor => 2,
|
||||
AssetPermissionRole::Viewer => 1,
|
||||
_ => 0,
|
||||
})
|
||||
.ok_or_else(|| anyhow!("No thread found with permissions"))?;
|
||||
|
||||
|
|
|
@ -430,6 +430,7 @@ pub async fn get_user_thread_permission(
|
|||
AssetPermissionRole::Owner => 3,
|
||||
AssetPermissionRole::Editor => 2,
|
||||
AssetPermissionRole::Viewer => 1,
|
||||
_ => 0,
|
||||
})
|
||||
.ok_or_else(|| anyhow!("No thread found with permissions"))?;
|
||||
|
||||
|
|
|
@ -158,6 +158,7 @@ pub async fn list_user_favorites(user: &AuthenticatedUser) -> Result<Vec<Favorit
|
|||
favorites.push(FavoriteEnum::Object(thread.clone()));
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -614,6 +614,12 @@ fn create_invitation_email_type(
|
|||
thread_name: asset_name,
|
||||
thread_id: asset_id,
|
||||
}),
|
||||
_ => EmailType::ThreadInvite(ThreadInvite {
|
||||
inviter_name,
|
||||
new_user,
|
||||
thread_name: asset_name,
|
||||
thread_id: asset_id,
|
||||
}),
|
||||
};
|
||||
|
||||
email_type
|
||||
|
@ -673,6 +679,9 @@ async fn get_asset_name(asset_id: Arc<Uuid>, asset_type: AssetType) -> Result<St
|
|||
}
|
||||
}
|
||||
}
|
||||
AssetType::Chat => {
|
||||
return Err(anyhow!("Public access is not supported for chats yet"));
|
||||
}
|
||||
};
|
||||
|
||||
Ok(name)
|
||||
|
|
Loading…
Reference in New Issue