Feature/unicode groupname validation (#1600)

Allow all UTF-8 characters except URL identifiers as user and group names and for namespaces.

Fixes #1513

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
This commit is contained in:
Eduard Heimbuch
2021-03-25 09:59:23 +01:00
committed by GitHub
parent 8f2272885b
commit 22a0362892
20 changed files with 299 additions and 358 deletions

View File

@@ -83,6 +83,11 @@ const NamespaceAndNameFields: FC<Props> = ({ repository, onChange, setValid, dis
};
const renderNamespaceField = () => {
let informationMessage = undefined;
if (repository?.namespace?.indexOf(" ") > 0) {
informationMessage = t("validation.namespaceSpaceWarningText");
}
const props = {
label: t("repository.namespace"),
helpText: t("help.namespaceHelpText"),
@@ -90,7 +95,8 @@ const NamespaceAndNameFields: FC<Props> = ({ repository, onChange, setValid, dis
onChange: handleNamespaceChange,
errorMessage: t("validation.namespace-invalid"),
validationError: namespaceValidationError,
disabled: disabled
disabled: disabled,
informationMessage
};
if (namespaceStrategy === CUSTOM_NAMESPACE_STRATEGY) {