mirror of
https://github.com/documize/community.git
synced 2025-07-24 07:39:43 +02:00
fix got blank page when CAS auth failure
This commit is contained in:
parent
fded0014a3
commit
9d0d4a7861
2 changed files with 5 additions and 7 deletions
|
@ -23,12 +23,11 @@ export default Route.extend({
|
|||
refreshModel: true
|
||||
},
|
||||
ticket : {
|
||||
refreshModel: true,
|
||||
replace : true,
|
||||
refreshModel: true
|
||||
}
|
||||
},
|
||||
message: '',
|
||||
|
||||
mode: 'login',
|
||||
afterModel(model) {
|
||||
return new EmberPromise((resolve) => {
|
||||
let constants = this.get('constants');
|
||||
|
@ -45,11 +44,11 @@ export default Route.extend({
|
|||
this.transitionTo('folders');
|
||||
}, (reject) => {
|
||||
if (!_.isUndefined(reject.Error)) {
|
||||
this.set('message', reject.Error);
|
||||
model.message = reject.Error;
|
||||
} else {
|
||||
this.set('message', reject);
|
||||
model.message = reject.Error;
|
||||
}
|
||||
this.set('mode', 'reject');
|
||||
model.mode = 'reject';
|
||||
resolve();
|
||||
});
|
||||
|
||||
|
|
|
@ -8,6 +8,5 @@
|
|||
{{#if (is-equal model.mode "reject")}}
|
||||
<div class="sso-box">
|
||||
<p>CAS authentication failure</p>
|
||||
<p>{{model.message}}</p>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue