Skip to content

Commit

Permalink
Do not load LDAP configuration on store init
Browse files Browse the repository at this point in the history
Instead, get the configuration when loading the component.

Fixes #2572
  • Loading branch information
Edmundo Alvarez committed Aug 1, 2016
1 parent 6711f52 commit e158568
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { Button } from 'react-bootstrap';
import LdapComponent from 'components/ldap/LdapComponent';
import LdapGroupsComponent from 'components/ldap/LdapGroupsComponent';

import CombinedProvider from 'injection/CombinedProvider';
const { LdapActions } = CombinedProvider.get('Ldap');

const LegacyLdapConfig = React.createClass({
propTypes: {
config: PropTypes.object,
Expand All @@ -15,6 +18,10 @@ const LegacyLdapConfig = React.createClass({
};
},

componentDidMount() {
LdapActions.loadSettings();
},

_toggleButton() {
this.setState({ showSettings: !this.state.showSettings });
},
Expand Down
4 changes: 0 additions & 4 deletions graylog2-web-interface/src/stores/ldap/LdapStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ const LdapStore = Reflux.createStore({
sourceUrl: '/system/ldap/',
ldapSettings: undefined,

init() {
this.loadSettings();
},

getInitialState() {
return {ldapSettings: this.ldapSettings};
},
Expand Down

0 comments on commit e158568

Please sign in to comment.