Join team correctly when signing up with LDAP (#3287)
Этот коммит содержится в:
@@ -173,11 +173,24 @@ export default class SignupUserComplete extends React.Component {
|
|||||||
this.state.ldapPassword,
|
this.state.ldapPassword,
|
||||||
null,
|
null,
|
||||||
() => {
|
() => {
|
||||||
GlobalActions.emitInitialLoad(
|
if (this.props.location.query.id || this.props.location.query.h) {
|
||||||
() => {
|
Client.addUserToTeamFromInvite(
|
||||||
browserHistory.push('/select_team');
|
this.props.location.query.d,
|
||||||
}
|
this.props.location.query.h,
|
||||||
);
|
this.props.location.query.id,
|
||||||
|
() => {
|
||||||
|
this.finishSignup();
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
// there's not really a good way to deal with this, so just let the user log in like normal
|
||||||
|
this.finishSignup();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.finishSignup();
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
if (err.id === 'ent.ldap.do_login.user_not_registered.app_error' || err.id === 'ent.ldap.do_login.user_filtered.app_error') {
|
if (err.id === 'ent.ldap.do_login.user_not_registered.app_error' || err.id === 'ent.ldap.do_login.user_filtered.app_error') {
|
||||||
@@ -205,6 +218,15 @@ export default class SignupUserComplete extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
finishSignup() {
|
||||||
|
GlobalActions.emitInitialLoad(
|
||||||
|
() => {
|
||||||
|
GlobalActions.loadDefaultLocale();
|
||||||
|
browserHistory.push('/select_team');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
handleUserCreated(user, data) {
|
handleUserCreated(user, data) {
|
||||||
track('signup', 'signup_user_02_complete');
|
track('signup', 'signup_user_02_complete');
|
||||||
Client.loginById(
|
Client.loginById(
|
||||||
@@ -761,4 +783,4 @@ export default class SignupUserComplete extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user