Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove digest in authentication service #4461

Merged
merged 3 commits into from
Dec 13, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions contribs/gmf/src/authentication/Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ const exports = class extends olEventsEventTarget {
withCredentials: true
}).then(((response) => {
this.user_.is_password_changed = true;
this.$rootScope_.$digest();
}).bind(this));
}));
}

/**
Expand Down
11 changes: 6 additions & 5 deletions contribs/gmf/src/authentication/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,14 @@ exports.AuthenticationController_ = class {
this.setError_(errors);
} else {
// Send request with current credentials, which may fail if the old password given is incorrect.
const error = gettextCatalog.getString('Incorrect old password.');
this.gmfAuthenticationService_.changePassword(oldPwd, newPwd, confPwd).then(
() => {
this.gmfAuthenticationService_.changePassword(oldPwd, newPwd, confPwd)
.then(() => {
this.changePasswordModalShown = true;
this.changePasswordReset();
},
this.setError_.bind(this, error));
})
.catch((err) => {
this.setError_(gettextCatalog.getString('Incorrect old password.'));
});
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/src/filters/filterselectorComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ exports.Controller_ = class {
);

// Manage the data sources that are already in the collection
this.gmfDataSources_.forEach(this.registerDataSource_, this);
this.gmfDataSources_.forEach(this.registerDataSource_.bind(this));

} else {
keys.forEach(olEvents.unlistenByKey);
Expand Down