Unverified Commit 2aa19427 authored by Saturnino Abril's avatar Saturnino Abril Committed by GitHub
Browse files

clean up getPasswordConfig by removing unused parameter (#1267)


Signed-off-by: default avatarSaturnino Abril <saturnino.abril@gmail.com>
parent c76cb3a0
...@@ -2,18 +2,17 @@ ...@@ -2,18 +2,17 @@
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {getConfig, getLicense} from 'mattermost-redux/selectors/entities/general'; import {getConfig} from 'mattermost-redux/selectors/entities/general';
import {getPasswordConfig} from 'utils/utils.jsx'; import {getPasswordConfig} from 'utils/utils.jsx';
import ResetPasswordModal from './reset_password_modal.jsx'; import ResetPasswordModal from './reset_password_modal.jsx';
function mapStateToProps(state) { function mapStateToProps(state) {
const license = getLicense(state);
const config = getConfig(state); const config = getConfig(state);
return { return {
passwordConfig: getPasswordConfig(license, config), passwordConfig: getPasswordConfig(config),
}; };
} }
......
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {getLicense, getConfig} from 'mattermost-redux/selectors/entities/general'; import {getConfig} from 'mattermost-redux/selectors/entities/general';
import {getPasswordConfig} from 'utils/utils.jsx'; import {getPasswordConfig} from 'utils/utils.jsx';
import ClaimController from './claim_controller.jsx'; import ClaimController from './claim_controller.jsx';
function mapStateToProps(state) { function mapStateToProps(state) {
const license = getLicense(state);
const config = getConfig(state); const config = getConfig(state);
const siteName = config.SiteName; const siteName = config.SiteName;
const ldapLoginFieldName = config.LdapLoginFieldName; const ldapLoginFieldName = config.LdapLoginFieldName;
...@@ -17,7 +16,7 @@ function mapStateToProps(state) { ...@@ -17,7 +16,7 @@ function mapStateToProps(state) {
return { return {
siteName, siteName,
ldapLoginFieldName, ldapLoginFieldName,
passwordConfig: getPasswordConfig(license, config), passwordConfig: getPasswordConfig(config),
}; };
} }
......
...@@ -30,7 +30,7 @@ function mapStateToProps(state) { ...@@ -30,7 +30,7 @@ function mapStateToProps(state) {
customBrand, customBrand,
enableCustomBrand, enableCustomBrand,
customDescriptionText, customDescriptionText,
passwordConfig: getPasswordConfig(license, config), passwordConfig: getPasswordConfig(config),
}; };
} }
......
...@@ -46,7 +46,7 @@ function mapStateToProps(state, ownProps) { ...@@ -46,7 +46,7 @@ function mapStateToProps(state, ownProps) {
enableSaml, enableSaml,
enableSignUpWithOffice365, enableSignUpWithOffice365,
experimentalEnableAuthenticationTransfer, experimentalEnableAuthenticationTransfer,
passwordConfig: getPasswordConfig(license, config), passwordConfig: getPasswordConfig(config),
}; };
} }
......
...@@ -1431,7 +1431,7 @@ export function canCreateCustomEmoji(user) { ...@@ -1431,7 +1431,7 @@ export function canCreateCustomEmoji(user) {
return true; return true;
} }
export function getPasswordConfig(license, config) { export function getPasswordConfig(config) {
return { return {
minimumLength: parseInt(config.PasswordMinimumLength, 10), minimumLength: parseInt(config.PasswordMinimumLength, 10),
requireLowercase: config.PasswordRequireLowercase === 'true', requireLowercase: config.PasswordRequireLowercase === 'true',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment