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

Fix content and validation in Invite User to Set Password configurations #5447

Merged
merged 4 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@
*/
export class GovernanceConnectorConstants {

/**
* Ask Password Form element constraints.
*/
public static readonly ASK_PASSWORD_FORM_FIELD_CONSTRAINTS: {
EXPIRY_TIME_MAX_LENGTH: number;
EXPIRY_TIME_MAX_VALUE: number;
EXPIRY_TIME_MIN_LENGTH: number;
EXPIRY_TIME_MIN_VALUE: number;
} = {
EXPIRY_TIME_MAX_LENGTH: 5,
EXPIRY_TIME_MAX_VALUE: 10080,
EXPIRY_TIME_MIN_LENGTH: 1,
EXPIRY_TIME_MIN_VALUE: -1
};

/**
* Self Registration Form element constraints.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export const AskPasswordForm: FunctionComponent<AskPasswordFormPropsInterface> =
label={ GovernanceConnectorUtils.resolveFieldLabel(
"User Onboarding",
PROPERTY_NAMES.EMAIL_VERIFICATION_ENABLE,
"Enable user email verification") }
"Enable email invitations for user password setup") }
defaultValue={ initialFormValues?.[
PROPERTY_NAMES.EMAIL_VERIFICATION_ENABLE ] === "true" }
readOnly={ readOnly }
Expand All @@ -197,7 +197,7 @@ export const AskPasswordForm: FunctionComponent<AskPasswordFormPropsInterface> =
hint={ GovernanceConnectorUtils.resolveFieldHint(
"User Onboarding",
PROPERTY_NAMES.EMAIL_VERIFICATION_ENABLE,
"A verification notification will be triggered during user creation.")
"An email will be sent to the user to set the password after user creation.")
}
hidden={ !serverConfigurationConfig.dynamicConnectors }
/>
Expand Down Expand Up @@ -254,11 +254,11 @@ export const AskPasswordForm: FunctionComponent<AskPasswordFormPropsInterface> =
PROPERTY_NAMES.EMAIL_VERIFICATION_EXPIRY_TIME)
}
min={
GovernanceConnectorConstants.SELF_REGISTRATION_FORM_FIELD_CONSTRAINTS
GovernanceConnectorConstants.ASK_PASSWORD_FORM_FIELD_CONSTRAINTS
.EXPIRY_TIME_MIN_VALUE
}
max={
GovernanceConnectorConstants.SELF_REGISTRATION_FORM_FIELD_CONSTRAINTS
GovernanceConnectorConstants.ASK_PASSWORD_FORM_FIELD_CONSTRAINTS
.EXPIRY_TIME_MAX_VALUE
}
width={ 12 }
Expand All @@ -272,12 +272,12 @@ export const AskPasswordForm: FunctionComponent<AskPasswordFormPropsInterface> =
"selfRegistration.form.fields.expiryTime.placeholder") }
maxLength={
GovernanceConnectorConstants
.SELF_REGISTRATION_FORM_FIELD_CONSTRAINTS.EXPIRY_TIME_MAX_LENGTH
.ASK_PASSWORD_FORM_FIELD_CONSTRAINTS.EXPIRY_TIME_MAX_LENGTH
}
labelPosition="right"
minLength={
GovernanceConnectorConstants
.SELF_REGISTRATION_FORM_FIELD_CONSTRAINTS.EXPIRY_TIME_MIN_LENGTH
.ASK_PASSWORD_FORM_FIELD_CONSTRAINTS.EXPIRY_TIME_MIN_LENGTH
}
readOnly={ readOnly }
disabled={ !isConnectorEnabled }
Expand All @@ -296,11 +296,11 @@ export const AskPasswordForm: FunctionComponent<AskPasswordFormPropsInterface> =
PROPERTY_NAMES.EMAIL_VERIFICATION_ASK_PASSWORD_EXPIRY_TIME)
}
min={
GovernanceConnectorConstants.SELF_REGISTRATION_FORM_FIELD_CONSTRAINTS
GovernanceConnectorConstants.ASK_PASSWORD_FORM_FIELD_CONSTRAINTS
.EXPIRY_TIME_MIN_VALUE
}
max={
GovernanceConnectorConstants.SELF_REGISTRATION_FORM_FIELD_CONSTRAINTS
GovernanceConnectorConstants.ASK_PASSWORD_FORM_FIELD_CONSTRAINTS
.EXPIRY_TIME_MAX_VALUE
}
width={ 12 }
Expand All @@ -314,12 +314,12 @@ export const AskPasswordForm: FunctionComponent<AskPasswordFormPropsInterface> =
"selfRegistration.form.fields.expiryTime.placeholder") }
maxLength={
GovernanceConnectorConstants
.SELF_REGISTRATION_FORM_FIELD_CONSTRAINTS.EXPIRY_TIME_MAX_LENGTH
.ASK_PASSWORD_FORM_FIELD_CONSTRAINTS.EXPIRY_TIME_MAX_LENGTH
}
labelPosition="right"
minLength={
GovernanceConnectorConstants
.SELF_REGISTRATION_FORM_FIELD_CONSTRAINTS.EXPIRY_TIME_MIN_LENGTH
.ASK_PASSWORD_FORM_FIELD_CONSTRAINTS.EXPIRY_TIME_MIN_LENGTH
}
readOnly={ readOnly }
disabled={ !isConnectorEnabled }
Expand All @@ -331,7 +331,8 @@ export const AskPasswordForm: FunctionComponent<AskPasswordFormPropsInterface> =
"User Onboarding",
PROPERTY_NAMES.EMAIL_VERIFICATION_ASK_PASSWORD_EXPIRY_TIME,
"Set the time span that the password setup invitation e-mail would be valid, " +
"in minutes. (For infinite validity period, set -1).")
"in minutes. (For infinite validity period, set -1. Setting 0 will cause immediate" +
" expiry of the invitation)")
}
>
<input/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ export const ConnectorEditPage: FunctionComponent<ConnectorEditPageInterface> =
return "Manage and configure settings related configuring "
+ "multiple attributes as the login identifier.";
case ServerConfigurationsConstants.ASK_PASSWORD_CONNECTOR_ID:
return "Allow users choose passwords in admin-initiated onboarding.";
return "Allow users to set their own passwords during admin-initiated onboarding" +
" and configure related settings.";
default:
return connector?.description
? connector.description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ export class GovernanceConnectorUtils {
testId: "self-registration-card"
},
{
description: "Allow users choose passwords in admin-initiated onboarding.",
description: "Allow users to set their own passwords during admin-initiated onboarding " +
"and configure related settings",
header: "Invite User to Set Password",
id: ServerConfigurationsConstants.ASK_PASSWORD_CONNECTOR_ID,
route: AppConstants.getPaths().get("GOVERNANCE_CONNECTOR_EDIT")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export const AddUserUpdated: React.FunctionComponent<AddUserProps> = (
<Trans
i18nKey="console:manage.features.user.modals.addUserWizard.askPassword.emailVerificationDisabled"
>
To invite users to set the password, enable email verification from <Link
To invite users to set the password, enable email invitations for user password setup from <Link
onClick={ () => history.push(AppConstants.getPaths().get("GOVERNANCE_CONNECTOR_EDIT")
.replace(":categoryId", ServerConfigurationsConstants.USER_ONBOARDING_CONNECTOR_ID)
.replace(":connectorId", ServerConfigurationsConstants.ASK_PASSWORD_CONNECTOR_ID)) }
Expand Down
8 changes: 4 additions & 4 deletions modules/i18n/src/translations/en-US/portals/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8742,8 +8742,8 @@ export const console: ConsoleNS = {
friendlyName: "Ask Password",
properties: {
emailVerificationEnable: {
hint: "A verification notification will be triggered during user creation.",
label: "Enable user email verification"
hint: "An email will be sent to the user to set the password after user creation.",
label: "Enable email invitations for user password setup"
},
emailVerificationLockOnCreation: {
hint: "The user account will be locked during user creation.",
Expand Down Expand Up @@ -11492,7 +11492,7 @@ export const console: ConsoleNS = {
alphanumericUsernameEnabled: "To invite users to set the password, disable " +
"alphanumeric username feature.",
emailInvalid: "To invite users to set the password, please enter a valid email address.",
emailVerificationDisabled: "To invite users to set the password, enable email verification from <1>Login & Registration settings</1>.",
emailVerificationDisabled: "To invite users to set the password, enable email invitations for user password setup from <1>Login & Registration settings</1>.",
inviteOffline: "Invite offline",
inviteViaEmail: "Invite via email"
},
Expand Down Expand Up @@ -12143,7 +12143,7 @@ export const console: ConsoleNS = {
header: "Before you proceed",
message: "Invite users option is disabled",
content: "Invite User to Set Password should be enabled to add multiple users. " +
"Please enable email verification from Login & Registration settings.",
"Please enable email invitations for user password setup from Login & Registration settings.",
assertionHint: "Please confirm your action."
}
},
Expand Down
12 changes: 6 additions & 6 deletions modules/i18n/src/translations/fr-FR/portals/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7124,8 +7124,8 @@ export const console: ConsoleNS = {
friendlyName: "Demander le mot de passe",
properties: {
emailVerificationEnable: {
hint: "Une notification de vérification sera déclenchée pendant la création d'utilisateurs.",
label: "Activer la vérification de l'e-mail utilisateur"
hint: "Un email sera envoyé à l'utilisateur pour définir le mot de passe après la création de l'utilisateur.",
label: "Activer les invitations par e-mail pour la configuration du mot de passe utilisateur"
},
emailVerificationLockOnCreation: {
hint: "Le compte d'utilisateur sera verrouillé pendant la création d'utilisateurs.",
Expand Down Expand Up @@ -9758,7 +9758,7 @@ export const console: ConsoleNS = {
"Fonction de nom d'utilisateur alphanumérique.",
emailInvalid: "Pour utiliser la fonction de réinitialisation du mot de passe, veuillez utiliser une adresse e-mail valide comme "+
"l'identifiant.",
emailVerificationDisabled: "Pour inviter les utilisateurs à définir le mot de passe, activez la vérification par e-mail à partir des <1>paramètres de connexion et d'enregistrement</1>.",
emailVerificationDisabled: "Pour inviter les utilisateurs à définir le mot de passe, activez les invitations par e-mail pour la configuration du mot de passe utilisateur dans les <1>Paramètres de connexion et d'inscription</1>.",
inviteOffline: "Inviter hors ligne",
inviteViaEmail: "Inviter par e-mail"
},
Expand Down Expand Up @@ -10448,9 +10448,9 @@ export const console: ConsoleNS = {
addMultipleUser: {
header: "Avant de continuer",
message: "L'option Inviter des utilisateurs est désactivée",
content: "Inviter l'utilisateur à définir le mot de passe doit être activé pour ajouter " +
"plusieurs utilisateurs. Veuillez activer la vérification des e-mails dans les paramètres" +
" de connexion et d'inscription.",
content: "Inviter l'utilisateur à définir le mot de passe doit être activé pour ajouter plusieurs utilisateurs. " +
"Veuillez activer les invitations par courrier électronique pour la configuration du mot de passe utilisateur dans" +
" les paramètres de connexion et d'inscription.",
assertionHint: "Veuillez confirmer votre action."
}
},
Expand Down
8 changes: 4 additions & 4 deletions modules/i18n/src/translations/si-LK/portals/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6956,8 +6956,8 @@ export const console: ConsoleNS = {
friendlyName: "මුරපදය අහන්න",
properties: {
emailVerificationEnable: {
hint: "පරිශීලක නිර්මාණය කිරීමේදී සත්යාපන දැනුම්දීමක් අවුලුවනු ඇත.",
label: "පරිශීලක විද්යුත් තැපැල් සත්යාපනය සක්රීය කරන්න"
hint: "පරිශීලක නිර්මාණය කිරීමෙන් පසු මුරපදය සැකසීමට පරිශීලකයාට විද්‍යුත් තැපෑලක් යවනු ලැබේ.",
label: "පරිශීලක මුරපද සැකසීම සඳහා ඊමේල් ආරාධනා සබල කරන්න"
},
emailVerificationLockOnCreation: {
hint: "පරිශීලක නිර්මාණය අතරතුර පරිශීලක ගිණුම අගුළු දමනු ඇත.",
Expand Down Expand Up @@ -9544,7 +9544,7 @@ export const console: ConsoleNS = {
"අක්ෂර සංඛ්යා පරිශීලක නාම ලක්ෂණය.",
emailInvalid: "මුරපද යළි පිහිටුවීමේ අංගය භාවිතා කිරීමට, කරුණාකර වලංගු විද්යුත් තැපැල් ලිපිනයක් භාවිතා කරන්න " +
"පරිශීලක නාමය.",
emailVerificationDisabled: "මුරපදය සැකසීමට පරිශීලකයින්ට ආරාධනා කිරීම, <1>පිවිසුම් සහ ලියාපදිංචි සැකසුම්</1> වලින් විද්යුත් තැපැල් සත්යාපනය සක්රීය කරන්න.",
emailVerificationDisabled: "මුරපදය සැකසීමට පරිශීලකයින්ට ආරාධනා කිරීමට, <1>පිවිසුම් සහ ලියාපදිංචි කිරීමේ සිටුවම්</1> වෙතින් පරිශීලක මුරපද සැකසීම සඳහා විද්‍යුත් තැපැල් ආරාධනා සබල කරන්න.",
inviteOffline: "නොබැඳි ලෙස ආරාධනා කරන්න",
inviteViaEmail: "විද්යුත් තැපෑලෙන් ආරාධනා කරන්න"
},
Expand Down Expand Up @@ -10196,7 +10196,7 @@ export const console: ConsoleNS = {
header: "ඔබ ඉදිරියට යාමට පෙර",
message: "පරිශීලකයින්ට ආරාධනා කිරීමේ විකල්පය අක්‍රීය​ කර ඇත",
content: "මුරපදය සැකසීමට පරිශීලකයාට ආරාධනා කරන්න බහු පරිශීලකයින් එක් කිරීමට සබල කළ යුතුය. " +
"කරුණාකර පිවිසුම් සහ ලියාපදිංචි කිරීමේ සිටුවම් වලින් විද්‍යුත් තැපෑල සත්‍යාපනය සක්‍රීය කරන්න.",
"කරුණාකර පිවිසුම් සහ ලියාපදිංචි කිරීමේ සිටුවම් වලින් පරිශීලක මුරපද පිහිටුවීම සඳහා විද්‍යුත් තැපැල් ආරාධනා සබල කරන්න.",
assertionHint: "කරුණාකර ඔබේ ක්‍රියාව තහවුරු කරන්න."
}
},
Expand Down
Loading