Skip to content
Snippets Groups Projects
Unverified Commit c8593ac5 authored by Tom Robinson's avatar Tom Robinson Committed by GitHub
Browse files

Merge pull request #8226 from metabase/fix-ldap-settings

Fix LDAP setting validation
parents c43b1959 24cc5072
Branches
Tags
No related merge requests found
......@@ -46,10 +46,14 @@ export default class LdapGroupMappingsWidget extends React.Component {
};
}
_showEditModal = (e: Event) => {
_showEditModal = async (e: Event) => {
e.preventDefault();
// just load the setting again to make sure it's up to date
const setting = _.findWhere(await SettingsApi.list(), {
key: "ldap-group-mappings",
});
this.setState({
mappings: this.props.settingValues["ldap-group-mappings"] || {},
mappings: (setting && setting.value) || {},
showEditModal: true,
});
PermissionsApi.groups().then(groups => this.setState({ groups }));
......
......@@ -252,13 +252,11 @@ const SECTIONS = [
display_name: t`User filter`,
type: "string",
validations: [
[
value =>
(value.match(/\(/g) || []).length !==
(value.match(/\)/g) || []).length
? t`Check your parentheses`
: null,
],
value =>
(value.match(/\(/g) || []).length !==
(value.match(/\)/g) || []).length
? t`Check your parentheses`
: null,
],
},
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment