mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
Fix missing items in renderAccountItem().
This commit is contained in:
@ -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 (
|
||||
// <div>
|
||||
// {
|
||||
// JSON.stringify({accountItem: accountItem, isSelf: isSelf, isAdmin: isAdmin})
|
||||
// }
|
||||
// </div>
|
||||
// )
|
||||
|
||||
if (accountItem.viewRule === "Self") {
|
||||
if (!isSelf && !isAdmin) {
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user