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