Move descriptions to database, switch to SHA-512 hashes, fix declining invites not working, allow user deletion, fix broken permission checks for many things, security fixes

This commit is contained in:
Geometrically
2021-01-14 10:08:38 -07:00
parent e2183c2214
commit ec3c31a106
23 changed files with 1106 additions and 699 deletions

View File

@@ -29,8 +29,10 @@ pub struct Mod {
pub title: String,
/// A short description of the mod.
pub description: String,
/// The link to the long description of the mod.
pub body_url: String,
/// A long form description of the mod.
pub body: String,
/// The link to the long description of the mod. (Deprecated), being replaced by `body`
pub body_url: Option<String>,
/// The date at which the mod was first published.
pub published: DateTime<Utc>,
/// The date at which the mod was first published.
@@ -192,7 +194,9 @@ pub struct Version {
pub name: String,
/// The version number. Ideally will follow semantic versioning
pub version_number: String,
/// A link to the changelog for this version of the mod.
/// The changelog for this version of the mod.
pub changelog: String,
/// A link to the changelog for this version of the mod. (Deprecated), being replaced by `changelog`
pub changelog_url: Option<String>,
/// The date that this version was published.
pub date_published: DateTime<Utc>,

View File

@@ -6,6 +6,8 @@ use serde::{Deserialize, Serialize};
#[serde(into = "Base62Id")]
pub struct UserId(pub u64);
pub const DELETED_USER: UserId = UserId(127155982985829);
#[derive(Serialize, Deserialize)]
pub struct User {
pub id: UserId,