Skip to content

Commit

Permalink
MID-6271 password-score/bootstrap-strength-meter somehow imported, he…
Browse files Browse the repository at this point in the history
…lper console.info() removed
  • Loading branch information
1azyman committed May 24, 2022
1 parent e1bc2a3 commit 57b8bc1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const strengthMeterOptions = [
{
'type': 'dictionary',
'leet': false,
'key': 'en',
'dictionary': {"5ecr3t": 1}
}
];

const strengthMeterOptions = [
{
'type': 'dictionary',
'leet': false,
'key': 'en',
'dictionary': {"5ecr3t":1}
}
];
window.strengthMeterOptions = strengthMeterOptions;

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

console.info("password-score");
/**
* Represents a keyboard for checking adjacency on.
*
Expand Down Expand Up @@ -1158,3 +1156,5 @@ Score.prototype = {
return string.split('').reverse().join('');
}
};

window.Score = Score;
14 changes: 14 additions & 0 deletions gui/admin-gui/src/frontend/js/passwords.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright (c) 2022 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/

// we've added global variable export using window.Score = Score; (at the end of the file)
require("./password-score/password-score");
require("./password-score/password-score-options");

require("./bootstrap-strength-meter/bootstrap-strength-meter");
// we've added global variable export using window.strengthMeterOptions = strengthMeterOptions; (at the end of the file)
require("./bootstrap-strength-meter/bootstrap-strength-meter-options");
2 changes: 2 additions & 0 deletions gui/admin-gui/src/frontend/js/vendors.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import '../../../node_modules/admin-lte/dist/js/adminlte';
import '../../../node_modules/bootstrap-select';
import '../../../node_modules/bootstrap-multiselect';

import './passwords';

import '../../../node_modules/ace-builds/src-noconflict/ace';

ace.config.setModuleUrl('ace/theme/eclipse',
Expand Down

0 comments on commit 57b8bc1

Please sign in to comment.