mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 18:25:47 +08:00
feat: fix public profile page shows blank page bug
This commit is contained in:
parent
6998451e97
commit
0dd474d5fc
@ -529,13 +529,14 @@ func GetMaskedApplication(application *Application, userId string) *Application
|
||||
application.OrganizationObj.PasswordSalt = "***"
|
||||
application.OrganizationObj.InitScore = -1
|
||||
application.OrganizationObj.EnableSoftDeletion = false
|
||||
application.OrganizationObj.IsProfilePublic = false
|
||||
|
||||
if !isOrgUser {
|
||||
application.OrganizationObj.MfaItems = nil
|
||||
if !application.OrganizationObj.IsProfilePublic {
|
||||
application.OrganizationObj.AccountItems = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return application
|
||||
}
|
||||
|
@ -201,6 +201,10 @@ class UserEditPage extends React.Component {
|
||||
}
|
||||
|
||||
updateUserField(key, value) {
|
||||
if (this.props.account === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
value = this.parseUserField(key, value);
|
||||
|
||||
const user = this.state.user;
|
||||
@ -989,7 +993,11 @@ class UserEditPage extends React.Component {
|
||||
<div style={{verticalAlign: "middle", marginBottom: 10}}>{`(${i18next.t("general:empty")})`}</div>
|
||||
</Col>
|
||||
}
|
||||
{
|
||||
(this.props.account === null) ? null : (
|
||||
<CropperDivModal disabled={disabled} tag={tag} setTitle={set} buttonText={`${title}...`} title={title} user={this.state.user} organization={this.getUserOrganization()} />
|
||||
)
|
||||
}
|
||||
</Col>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user