Skip to content

Commit

Permalink
Merge pull request #1176 from Ontotext-AD/GDB-9296-Improve-error-mess…
Browse files Browse the repository at this point in the history
…age-when-attempting-to-change-security-without-total-quorum

GDB-9296 Improve error message when attempting to change security without total quorum
  • Loading branch information
MartinaDimova authored Dec 15, 2023
2 parents 7257fd0 + 7922bbf commit 6312c76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/angular/core/services/jwt-auth.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,13 @@ angular.module('graphdb.framework.core.services.jwtauth', [

this.toggleSecurity = function (enabled) {
if (enabled !== this.securityEnabled) {
this.securityEnabled = enabled;
SecurityRestService.toggleSecurity(enabled).then(function () {
toastr.success($translate.instant('jwt.auth.security.status', {status: ($translate.instant(enabled ? 'enabled.status' : 'disabled.status'))}));
AuthTokenService.clearAuthToken();
that.initSecurity();
that.securityEnabled = enabled;
}, function (err) {
toastr.error(err.data.error.message, $translate.instant('common.error'));
toastr.error(err.data, $translate.instant('common.error'));
});
}
};
Expand Down

0 comments on commit 6312c76

Please sign in to comment.