67 lines
2.8 KiB
Diff
67 lines
2.8 KiB
Diff
|
Remove dependency on /usr/bin/pwscore that is part of libpwquality-tools
|
||
|
but we don't ship it in SLES
|
||
|
diff --git a/pkg/lib/cockpit-components-password.jsx b/pkg/lib/cockpit-components-password.jsx
|
||
|
index b97aab9..2241a75 100644
|
||
|
--- a/pkg/lib/cockpit-components-password.jsx
|
||
|
+++ b/pkg/lib/cockpit-components-password.jsx
|
||
|
@@ -18,7 +18,7 @@
|
||
|
*/
|
||
|
import cockpit from 'cockpit';
|
||
|
import React from 'react';
|
||
|
-import { FormGroup, Popover, Progress, ProgressSize, ProgressMeasureLocation, TextInput } from '@patternfly/react-core';
|
||
|
+import { FormGroup, Popover, TextInput } from '@patternfly/react-core';
|
||
|
import { HelpIcon } from '@patternfly/react-icons';
|
||
|
|
||
|
import './cockpit-components-password.scss';
|
||
|
@@ -27,6 +27,7 @@ const _ = cockpit.gettext;
|
||
|
|
||
|
export function password_quality(password, force) {
|
||
|
return new Promise((resolve, reject) => {
|
||
|
+ /*
|
||
|
cockpit.spawn('/usr/bin/pwscore', { err: "message" })
|
||
|
.input(password)
|
||
|
.done(function(content) {
|
||
|
@@ -42,6 +43,8 @@ export function password_quality(password, force) {
|
||
|
else
|
||
|
resolve({ value: 0 });
|
||
|
});
|
||
|
+ */
|
||
|
+ resolve({ message: _("pwscore not checked") });
|
||
|
});
|
||
|
}
|
||
|
|
||
|
@@ -53,6 +56,7 @@ export const PasswordFormFields = ({
|
||
|
error_password, error_password_confirm,
|
||
|
idPrefix, change
|
||
|
}) => {
|
||
|
+ /*
|
||
|
let variant;
|
||
|
if (password_strength === "")
|
||
|
variant = "default";
|
||
|
@@ -62,6 +66,7 @@ export const PasswordFormFields = ({
|
||
|
variant = "warning";
|
||
|
else
|
||
|
variant = "danger";
|
||
|
+ */
|
||
|
|
||
|
return (
|
||
|
<>
|
||
|
@@ -79,16 +84,7 @@ export const PasswordFormFields = ({
|
||
|
fieldId={idPrefix + "-pw1"}>
|
||
|
<TextInput className="check-passwords" type="password" id={idPrefix + "-pw1"}
|
||
|
value={password} onChange={value => change("password", value)} />
|
||
|
- <div>
|
||
|
- <Progress id={idPrefix + "-meter"}
|
||
|
- className={"ct-password-strength-meter " + variant}
|
||
|
- title={_("password quality")}
|
||
|
- size={ProgressSize.sm}
|
||
|
- measureLocation={ProgressMeasureLocation.none}
|
||
|
- variant={variant}
|
||
|
- value={Number.isInteger(password_strength) ? password_strength : 0} />
|
||
|
- <div id={idPrefix + "-password-meter-message"} className="pf-c-form__helper-text" aria-live="polite">{password_message}</div>
|
||
|
- </div>
|
||
|
+ <div id={idPrefix + "-password-meter-message"} className="pf-c-form__helper-text" aria-live="polite">{password_message}</div>
|
||
|
</FormGroup>
|
||
|
|
||
|
{password_confirm_label && <FormGroup label={password_confirm_label}
|