Skip to content
This repository has been archived by the owner on Oct 6, 2019. It is now read-only.

DNN-27517: add settings to control force logout after password changed function. #939

Merged
merged 3 commits into from
May 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,7 @@ public class UpdateMemberSettingsRequest
public int PasswordExpiry { get; set; }

public int PasswordExpiryReminder { get; set; }

public bool ForceLogoutAfterPasswordChanged { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,8 @@ public HttpResponseMessage GetMemberSettings()
Host.EnableStrengthMeter,
Host.EnableIPChecking,
Host.PasswordExpiry,
Host.PasswordExpiryReminder
Host.PasswordExpiryReminder,
ForceLogoutAfterPasswordChanged = HostController.Instance.GetBoolean("ForceLogoutAfterPasswordChanged")
}
}
};
Expand Down Expand Up @@ -421,6 +422,7 @@ public HttpResponseMessage UpdateMemberSettings(UpdateMemberSettingsRequest requ
HostController.Instance.Update("MembershipDaysBeforePasswordReuse", request.MembershipDaysBeforePasswordReuse.ToString(), false);
HostController.Instance.Update("PasswordExpiry", request.PasswordExpiry.ToString());
HostController.Instance.Update("PasswordExpiryReminder", request.PasswordExpiryReminder.ToString());
HostController.Instance.Update("ForceLogoutAfterPasswordChanged", request.ForceLogoutAfterPasswordChanged ? "Y" : "N", false);

return Request.CreateResponse(HttpStatusCode.OK, new { Success = true });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class MemberManagementPanelBody extends Component {
</div>
</InputGroup>
<InputGroup>
<div className="memberSettings-row_switch" style={{ margin: "0" }}>
<div className="memberSettings-row_switch" style={{ margin: "0 0 20px 0" }}>
<Label
labelType="inline"
tooltipMessage={resx.get("plEnableStrengthMeter.Help") }
Expand All @@ -283,7 +283,7 @@ class MemberManagementPanelBody extends Component {
</div>
</InputGroup>
<InputGroup>
<div className="memberSettings-row_switch" style={{ margin: "20px 0 20px 0" }}>
<div className="memberSettings-row_switch" style={{ margin: "0 0 20px 0" }}>
<Label
labelType="inline"
tooltipMessage={resx.get("plEnableIPChecking.Help") }
Expand All @@ -301,6 +301,25 @@ class MemberManagementPanelBody extends Component {
onChange={this.onSettingChange.bind(this, "EnableIPChecking") } />
</div>
</InputGroup>
<InputGroup>
<div className="memberSettings-row_switch" style={{ margin: "0 0 20px 0" }}>
<Label
labelType="inline"
tooltipMessage={resx.get("plForceLogOutAfterPasswordChanged.Help") }
label={resx.get("plForceLogOutAfterPasswordChanged") }
extra={
<Tooltip
messages={[resx.get("GlobalSetting")]}
type="global"
style={{ float: "left", position: "static" }} />
} />
<Switch
onText={resx.get("SwitchOn")}
offText={resx.get("SwitchOff")}
value={state.memberSettings.ForceLogoutAfterPasswordChanged}
onChange={this.onSettingChange.bind(this, "ForceLogoutAfterPasswordChanged") } />
</div>
</InputGroup>
<InputGroup>
<Label
tooltipMessage={resx.get("PasswordConfig_PasswordExpiry.Help") }
Expand Down Expand Up @@ -371,4 +390,4 @@ function mapStateToProps(state) {
};
}

export default connect(mapStateToProps)(MemberManagementPanelBody);
export default connect(mapStateToProps)(MemberManagementPanelBody);
Original file line number Diff line number Diff line change
Expand Up @@ -1156,4 +1156,10 @@
<data name="Check.Text" xml:space="preserve">
<value>[ Check ]</value>
</data>
<data name="plForceLogOutAfterPasswordChanged.Text" xml:space="preserve">
<value>Force Logout After Password Changed</value>
</data>
<data name="plForceLogOutAfterPasswordChanged.Help" xml:space="preserve">
<value>Force user logout in other browsers after the user's password has been changed.</value>
</data>
</root>