This commit is contained in:
2026-05-10 22:20:54 +08:00
parent d6219f1a0c
commit 192accd796
92 changed files with 7045 additions and 1559 deletions

View File

@@ -57,6 +57,8 @@ pub(super) struct AuthUserSnapshot {
pub(super) binding_status: String,
pub(super) wechat_bound: bool,
pub(super) token_version: u64,
#[serde(default)]
pub(super) user_tags: Vec<String>,
}
#[derive(Deserialize, Serialize)]

View File

@@ -210,6 +210,8 @@ fn import_auth_store_snapshot_tx(
password_hash: stored_user.password_hash,
password_login_enabled: stored_user.password_login_enabled,
token_version: user.token_version,
user_tags: module_runtime::normalize_profile_user_tags(user.user_tags)
.map_err(|error| error.to_string())?,
});
imported_user_count += 1;
@@ -339,6 +341,7 @@ fn export_auth_store_snapshot_from_tables_tx(
binding_status: user.binding_status,
wechat_bound: user.wechat_bound,
token_version: user.token_version,
user_tags: user.user_tags,
};
users_by_username.insert(
user.username,

View File

@@ -28,6 +28,8 @@ pub struct UserAccount {
pub(crate) password_hash: String,
pub(crate) password_login_enabled: bool,
pub(crate) token_version: u64,
#[default(Vec::<String>::new())]
pub(crate) user_tags: Vec<String>,
}
#[spacetimedb::table(