mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
Accept activation key during setup process
Enterprise edition only.
This commit is contained in:
parent
887c999a1e
commit
4d2f30711c
11 changed files with 161 additions and 52 deletions
|
@ -16,8 +16,12 @@ export default Route.extend({
|
|||
session: service(),
|
||||
localStorage: service(),
|
||||
|
||||
beforeModel() {
|
||||
beforeModel(transition) {
|
||||
this.get('localStorage').clearAll();
|
||||
|
||||
if (!_.isUndefined(transition.to.queryParams.fr)) {
|
||||
this.get('localStorage').setFirstRun();
|
||||
}
|
||||
},
|
||||
|
||||
model({ token }) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="sso-box">
|
||||
<p>Signing in...</p>
|
||||
<img src="/assets/img/busy-gray.gif">
|
||||
<img src="/assets/img/busy-gray.gif" alt="busy">
|
||||
</div>
|
||||
|
|
|
@ -23,10 +23,10 @@ export default Controller.extend({
|
|||
data: this.model,
|
||||
dataType: "text",
|
||||
}).then(() => {
|
||||
let dom = ""; // supports http://localhost:5001 installations (which is the default for all self-installs)
|
||||
var credentials = Encoding.Base64.encode(dom + ":" + this.model.email + ":" + this.model.password);
|
||||
window.location.href = "/auth/sso/" + encodeURIComponent(credentials);
|
||||
}).catch((error) => { // eslint-disable-line no-unused-vars
|
||||
let dom = ""; // supports http://localhost:5001 installs (which is the default for all self-installs)
|
||||
let credentials = Encoding.Base64.encode(dom + ":" + this.model.email + ":" + this.model.password);
|
||||
window.location.href = "/auth/sso/" + encodeURIComponent(credentials) + '?fr=1';
|
||||
}).catch((/*error*/) => {
|
||||
// TODO notify user of the error within the GUI
|
||||
});
|
||||
}
|
||||
|
|
|
@ -33,7 +33,9 @@ export default Route.extend({
|
|||
firstname: "",
|
||||
lastname: "",
|
||||
email: "",
|
||||
password: pwd
|
||||
password: pwd,
|
||||
activationKey: '',
|
||||
edition: document.head.querySelector("[property=edition]").content
|
||||
};
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue