Skip to content

Commit bf16abb

Browse files
committed
[account-settings] force password change
1 parent 0f5ac4a commit bf16abb

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

frontend/express/public/javascripts/countly/countly.template.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1227,8 +1227,8 @@ var AppRouter = Backbone.Router.extend({
12271227
else if ((countlyGlobal.security.password_expiration > 0) &&
12281228
(countlyGlobal.member.password_changed + countlyGlobal.security.password_expiration * 24 * 60 * 60 < new Date().getTime() / 1000) &&
12291229
(!countlyGlobal.ssr)) {
1230-
if (Backbone.history.fragment !== "/manage/user-settings/reset") {
1231-
this.navigate("/manage/user-settings/reset", true);
1230+
if (Backbone.history.fragment !== "/account-settings/reset") {
1231+
this.navigate("/account-settings/reset", true);
12321232
}
12331233
else {
12341234
viewName.render();

plugins/plugins/frontend/public/javascripts/countly.views.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@
556556
password: ""
557557
},
558558
changePassword: {
559-
showDialog: false,
559+
showDialog: this.$route.params && this.$route.params.reset || false,
560560
title: CV.i18n("configs.change-password"),
561561
saveButtonLabel: CV.i18n("configs.change-password"),
562562
cancelButtonLabel: CV.i18n("configs.cancel"),
@@ -1101,6 +1101,12 @@
11011101
this.renderWhenReady(getAccountView());
11021102
});
11031103

1104+
app.route('/account-settings/reset', 'account-settings', function() {
1105+
var view = getAccountView();
1106+
view.params = {reset: true};
1107+
this.renderWhenReady(view);
1108+
});
1109+
11041110
$(document).ready(function() {
11051111
if (countlyAuth.validateGlobalAdmin()) {
11061112
if (countlyGlobal.COUNTLY_CONTAINER !== 'frontend') {

0 commit comments

Comments
 (0)