diff --git a/src/api/admin.rs b/src/api/admin.rs index 51d0e73c..6e511c3e 100644 --- a/src/api/admin.rs +++ b/src/api/admin.rs @@ -351,17 +351,17 @@ async fn get_users_property(users: Vec<(User, Option)>, conn: &DbConn) let mut users_json = Vec::with_capacity(users.len()); for (u, sso_u) in users { let mut usr = u.to_json(conn).await; - usr["cipher_count"] = json!(Cipher::count_owned_by_user(&u.uuid, conn).await); - usr["attachment_count"] = json!(Attachment::count_by_user(&u.uuid, conn).await); - usr["attachment_size"] = json!(get_display_size(Attachment::size_by_user(&u.uuid, conn).await)); - usr["user_enabled"] = json!(u.enabled); - usr["created_at"] = json!(format_naive_datetime_local(&u.created_at, DT_FMT)); - usr["last_active"] = match u.last_active(conn).await { + usr["cipherCount"] = json!(Cipher::count_owned_by_user(&u.uuid, conn).await); + usr["attachmentCount"] = json!(Attachment::count_by_user(&u.uuid, conn).await); + usr["attachmentSize"] = json!(get_display_size(Attachment::size_by_user(&u.uuid, conn).await)); + usr["userEnabled"] = json!(u.enabled); + usr["createdAt"] = json!(format_naive_datetime_local(&u.created_at, DT_FMT)); + usr["lastActive"] = match u.last_active(conn).await { Some(dt) => json!(format_naive_datetime_local(&dt, DT_FMT)), None => json!("Never"), }; - usr["sso_identifier"] = json!(sso_u.map(|u| u.identifier.to_string()).unwrap_or(String::new())); + usr["ssoIdentifier"] = json!(sso_u.map(|u| u.identifier.to_string()).unwrap_or(String::new())); users_json.push(usr); } diff --git a/src/static/templates/admin/users.hbs b/src/static/templates/admin/users.hbs index 52458012..ec42f27f 100644 --- a/src/static/templates/admin/users.hbs +++ b/src/static/templates/admin/users.hbs @@ -26,7 +26,7 @@ {{name}} {{email}} - {{#unless user_enabled}} + {{#unless userEnabled}} Disabled {{/unless}} {{#if twoFactorEnabled}} @@ -43,22 +43,22 @@ {{#if ../sso_enabled}} - {{sso_identifier}} + {{ssoIdentifier}} {{/if}} - {{created_at}} + {{createdAt}} - {{last_active}} + {{lastActive}} - {{cipher_count}} + {{cipherCount}} - Amount: {{attachment_count}} + Amount: {{attachmentCount}} {{#if attachment_count}} - Size: {{attachment_size}} + Size: {{attachmentSize}} {{/if}} @@ -78,7 +78,7 @@ {{#if ../sso_enabled}}
{{/if}} - {{#if user_enabled}} + {{#if userEnabled}}
{{else}}