-export const IllegalNamingWarning = ({ name }: IllegalNamingWarningProps) =>
- <WarningComponent
- text={name} rules={[/\//, /^\.{1,2}$/]}
- message="Names being '.', '..' or including '/' cause issues with WebDAV, please edit it to something different." />;
\ No newline at end of file
+
+export const IllegalNamingWarning = connect(
+ (state: RootState) => {
+ return {
+ validate: (state.auth.config.clusterConfig.Collections.ForwardSlashNameSubstitution === "" ?
+ [disallowSlash] : [])
+ };
+ })(({ name, validate }: IllegalNamingWarningProps) =>
+ <WarningComponent
+ text={name} rules={validate}
+ message="Names embedding '/' will be renamed or invisible to file system access (arv-mount or WebDAV)" />);