mirror of
https://github.com/documize/community.git
synced 2025-07-18 20:59:43 +02:00
improved setup mode detection
This commit is contained in:
parent
761d3c212c
commit
fddaf9effe
8 changed files with 635 additions and 628 deletions
|
@ -8,7 +8,7 @@ The mission is to bring software dev inspired features (refactoring, testing, li
|
||||||
|
|
||||||
## Latest version
|
## Latest version
|
||||||
|
|
||||||
v1.49.1
|
v1.49.2
|
||||||
|
|
||||||
## OS Support
|
## OS Support
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,9 @@ export default Ember.Route.extend(ApplicationRouteMixin, TooltipMixin, {
|
||||||
|
|
||||||
return this.get('appMeta').boot(transition.targetName, window.location.href).then(data => {
|
return this.get('appMeta').boot(transition.targetName, window.location.href).then(data => {
|
||||||
if (sa !== "authenticator:documize" && sa !== "authenticator:keycloak" && data.allowAnonymousAccess) {
|
if (sa !== "authenticator:documize" && sa !== "authenticator:keycloak" && data.allowAnonymousAccess) {
|
||||||
return this.get('session').authenticate('authenticator:anonymous', data);
|
if (!this.get('appMeta.setupMode')) {
|
||||||
|
return this.get('session').authenticate('authenticator:anonymous', data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -39,7 +41,12 @@ export default Ember.Route.extend(ApplicationRouteMixin, TooltipMixin, {
|
||||||
},
|
},
|
||||||
|
|
||||||
sessionAuthenticated() {
|
sessionAuthenticated() {
|
||||||
|
if (this.get('appMeta.setupMode')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let next = this.get('localStorage').getSessionItem('entryUrl');
|
let next = this.get('localStorage').getSessionItem('entryUrl');
|
||||||
|
|
||||||
if (is.not.null(next) && is.not.undefined(next)) {
|
if (is.not.null(next) && is.not.undefined(next)) {
|
||||||
this.get('localStorage').clearSessionItem('entryUrl')
|
this.get('localStorage').clearSessionItem('entryUrl')
|
||||||
|
|
||||||
|
@ -60,7 +67,7 @@ export default Ember.Route.extend(ApplicationRouteMixin, TooltipMixin, {
|
||||||
console.log(error); // eslint-disable-line no-console
|
console.log(error); // eslint-disable-line no-console
|
||||||
console.log(transition); // eslint-disable-line no-console
|
console.log(transition); // eslint-disable-line no-console
|
||||||
|
|
||||||
if (netUtil.isAjaxAccessError(error)) {
|
if (netUtil.isAjaxAccessError(error) && !this.get('appMeta.setupMode')) {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
return this.transitionTo('auth.login');
|
return this.transitionTo('auth.login');
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,27 +4,27 @@
|
||||||
<div class="title">Let's setup Documize</div>
|
<div class="title">Let's setup Documize</div>
|
||||||
<div class="tip">Database name is <em>{{model.dbname}}</em></div>
|
<div class="tip">Database name is <em>{{model.dbname}}</em></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-control">
|
<div class="input-control input-transparent">
|
||||||
<label>Team</label>
|
<label>Team</label>
|
||||||
<div class="tip">What's your tribe called?</div>
|
<div class="tip">What's your tribe called?</div>
|
||||||
{{focus-input id="siteTitle" type="text" value=model.title class=(if hasEmptyTitleError 'error')}}
|
{{focus-input id="siteTitle" type="text" value=model.title class=(if hasEmptyTitleError 'error')}}
|
||||||
</div>
|
</div>
|
||||||
<div class="input-control">
|
<div class="input-control input-transparent">
|
||||||
<label>Firstname</label>
|
<label>Firstname</label>
|
||||||
<div class="tip">What do people call you?</div>
|
<div class="tip">What do people call you?</div>
|
||||||
{{input id="adminFirstname" type="text" value=model.firstname class=(if hasEmptyFirstnameError 'error')}}
|
{{input id="adminFirstname" type="text" value=model.firstname class=(if hasEmptyFirstnameError 'error')}}
|
||||||
</div>
|
</div>
|
||||||
<div class="input-control">
|
<div class="input-control input-transparent">
|
||||||
<label>Lastname</label>
|
<label>Lastname</label>
|
||||||
<div class="tip">How the government refers to you.</div>
|
<div class="tip">How the government refers to you</div>
|
||||||
{{input id="adminLastname" type="text" value=model.lastname class=(if hasEmptyLastnameError 'error')}}
|
{{input id="adminLastname" type="text" value=model.lastname class=(if hasEmptyLastnameError 'error')}}
|
||||||
</div>
|
</div>
|
||||||
<div class="input-control">
|
<div class="input-control input-transparent">
|
||||||
<label>Email</label>
|
<label>Email</label>
|
||||||
<div class="tip">No spam. Ever!</div>
|
<div class="tip">No spam. Ever!</div>
|
||||||
{{input id="adminEmail" type="email" value=model.email class=(if hasEmptyEmailError 'error')}}
|
{{input id="adminEmail" type="email" value=model.email class=(if hasEmptyEmailError 'error')}}
|
||||||
</div>
|
</div>
|
||||||
<div class="input-control">
|
<div class="input-control input-transparent">
|
||||||
<label>Password</label>
|
<label>Password</label>
|
||||||
<div class="tip">Something you can remember without writing it down.</div>
|
<div class="tip">Something you can remember without writing it down.</div>
|
||||||
{{input id="adminPassword" type="text" value=model.password class=(if hasEmptyPasswordError 'error')}}
|
{{input id="adminPassword" type="text" value=model.password class=(if hasEmptyPasswordError 'error')}}
|
||||||
|
|
|
@ -49,7 +49,7 @@ function isAjaxAccessError(reason) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof reason.errors === "undefined") {
|
if (typeof reason.errors !== "undefined") {
|
||||||
if (reason.errors.length > 0 && (reason.errors[0].status === "401" || reason.errors[0].status === "403")) {
|
if (reason.errors.length > 0 && (reason.errors[0].status === "401" || reason.errors[0].status === "403")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "documize",
|
"name": "documize",
|
||||||
"version": "1.49.1",
|
"version": "1.49.2",
|
||||||
"description": "The Document IDE",
|
"description": "The Document IDE",
|
||||||
"private": true,
|
"private": true,
|
||||||
"repository": "",
|
"repository": "",
|
||||||
|
|
|
@ -35,7 +35,7 @@ var Product core.ProdInfo
|
||||||
func init() {
|
func init() {
|
||||||
Product.Major = "1"
|
Product.Major = "1"
|
||||||
Product.Minor = "49"
|
Product.Minor = "49"
|
||||||
Product.Patch = "1"
|
Product.Patch = "2"
|
||||||
Product.Version = fmt.Sprintf("%s.%s.%s", Product.Major, Product.Minor, Product.Patch)
|
Product.Version = fmt.Sprintf("%s.%s.%s", Product.Major, Product.Minor, Product.Patch)
|
||||||
Product.Edition = "Community"
|
Product.Edition = "Community"
|
||||||
Product.Title = fmt.Sprintf("%s Edition", Product.Edition)
|
Product.Title = fmt.Sprintf("%s Edition", Product.Edition)
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,16 +1,16 @@
|
||||||
{
|
{
|
||||||
"community":
|
"community":
|
||||||
{
|
{
|
||||||
"version": "1.49.1",
|
"version": "1.49.2",
|
||||||
"major": 1,
|
"major": 1,
|
||||||
"minor": 49,
|
"minor": 49,
|
||||||
"revision": 1
|
"patch": 2
|
||||||
},
|
},
|
||||||
"enterprise":
|
"enterprise":
|
||||||
{
|
{
|
||||||
"version": "1.51.1",
|
"version": "1.51.2",
|
||||||
"major": 1,
|
"major": 1,
|
||||||
"minor": 51,
|
"minor": 51,
|
||||||
"revision": 1
|
"patch": 2
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue