From 8d0e92edefd505f18e00ae2873d564d442a0e5f4 Mon Sep 17 00:00:00 2001 From: Gucheng Wang Date: Tue, 21 Jun 2022 17:08:08 +0800 Subject: [PATCH] Fix missing items in renderAccountItem(). --- web/src/UserEditPage.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/src/UserEditPage.js b/web/src/UserEditPage.js index 74f4d936..27f4f5a8 100644 --- a/web/src/UserEditPage.js +++ b/web/src/UserEditPage.js @@ -129,9 +129,17 @@ class UserEditPage extends React.Component { return null; } - const isSelf = this.state.user.id === this.props.account; + const isSelf = this.state.user.id === this.props.account?.id; const isAdmin = Setting.isAdminUser(this.props.account); + // return ( + //
+ // { + // JSON.stringify({accountItem: accountItem, isSelf: isSelf, isAdmin: isAdmin}) + // } + //
+ // ) + if (accountItem.viewRule === "Self") { if (!isSelf && !isAdmin) { return null;