specify a brand when registering accounts
This commit is contained in:
parent
0ef0120227
commit
83fd02bdfa
3 changed files with 9 additions and 1 deletions
|
@ -51,6 +51,7 @@ class Register extends Signup {
|
||||||
this.username = undefined; // desired
|
this.username = undefined; // desired
|
||||||
this.email = undefined; // desired
|
this.email = undefined; // desired
|
||||||
this.password = undefined; // desired
|
this.password = undefined; // desired
|
||||||
|
this.brand = undefined; // optional brand to let the HS brand its mail notifs
|
||||||
}
|
}
|
||||||
|
|
||||||
setClientSecret(secret) {
|
setClientSecret(secret) {
|
||||||
|
@ -73,6 +74,10 @@ class Register extends Signup {
|
||||||
this.guestAccessToken = token;
|
this.guestAccessToken = token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setBrand(brand) {
|
||||||
|
this.brand = brand;
|
||||||
|
}
|
||||||
|
|
||||||
getStep() {
|
getStep() {
|
||||||
return this._step;
|
return this._step;
|
||||||
}
|
}
|
||||||
|
@ -131,7 +136,7 @@ class Register extends Signup {
|
||||||
|
|
||||||
return MatrixClientPeg.get().register(
|
return MatrixClientPeg.get().register(
|
||||||
this.username, this.password, this.params.sessionId, authDict, bindEmail,
|
this.username, this.password, this.params.sessionId, authDict, bindEmail,
|
||||||
this.guestAccessToken
|
this.guestAccessToken, this.brand
|
||||||
).then(function(result) {
|
).then(function(result) {
|
||||||
self.credentials = result;
|
self.credentials = result;
|
||||||
self.setStep("COMPLETE");
|
self.setStep("COMPLETE");
|
||||||
|
|
|
@ -1160,6 +1160,7 @@ module.exports = React.createClass({
|
||||||
guestAccessToken={this.state.guestAccessToken}
|
guestAccessToken={this.state.guestAccessToken}
|
||||||
defaultHsUrl={this.props.config.default_hs_url}
|
defaultHsUrl={this.props.config.default_hs_url}
|
||||||
defaultIsUrl={this.props.config.default_is_url}
|
defaultIsUrl={this.props.config.default_is_url}
|
||||||
|
brand={this.props.config.brand}
|
||||||
customHsUrl={this.getCurrentHsUrl()}
|
customHsUrl={this.getCurrentHsUrl()}
|
||||||
customIsUrl={this.getCurrentIsUrl()}
|
customIsUrl={this.getCurrentIsUrl()}
|
||||||
registrationUrl={this.props.registrationUrl}
|
registrationUrl={this.props.registrationUrl}
|
||||||
|
|
|
@ -40,6 +40,7 @@ module.exports = React.createClass({
|
||||||
customIsUrl: React.PropTypes.string,
|
customIsUrl: React.PropTypes.string,
|
||||||
defaultHsUrl: React.PropTypes.string,
|
defaultHsUrl: React.PropTypes.string,
|
||||||
defaultIsUrl: React.PropTypes.string,
|
defaultIsUrl: React.PropTypes.string,
|
||||||
|
brand: React.PropTypes.string,
|
||||||
email: React.PropTypes.string,
|
email: React.PropTypes.string,
|
||||||
username: React.PropTypes.string,
|
username: React.PropTypes.string,
|
||||||
guestAccessToken: React.PropTypes.string,
|
guestAccessToken: React.PropTypes.string,
|
||||||
|
@ -66,6 +67,7 @@ module.exports = React.createClass({
|
||||||
this.registerLogic.setRegistrationUrl(this.props.registrationUrl);
|
this.registerLogic.setRegistrationUrl(this.props.registrationUrl);
|
||||||
this.registerLogic.setIdSid(this.props.idSid);
|
this.registerLogic.setIdSid(this.props.idSid);
|
||||||
this.registerLogic.setGuestAccessToken(this.props.guestAccessToken);
|
this.registerLogic.setGuestAccessToken(this.props.guestAccessToken);
|
||||||
|
this.registerLogic.setBrand(this.props.brand);
|
||||||
this.registerLogic.recheckState();
|
this.registerLogic.recheckState();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue