mirror of
https://github.com/documize/community.git
synced 2025-08-08 06:55:28 +02:00
Add guard to check whether tests are running
This commit is contained in:
parent
368bb6850e
commit
ac9b749dd2
1 changed files with 6 additions and 1 deletions
|
@ -1,10 +1,15 @@
|
|||
import Ember from 'ember';
|
||||
import config from 'documize/config/environment';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
activate: function(){
|
||||
this.session.logout();
|
||||
this.audit.record("logged-in");
|
||||
this.audit.stop();
|
||||
window.document.location = this.session.appMeta.allowAnonymousAccess ? "/" : "/auth/login";
|
||||
if (config.environment === 'test') {
|
||||
this.transitionTo('auth.login');
|
||||
}else{
|
||||
window.document.location = this.session.appMeta.allowAnonymousAccess ? "/" : "/auth/login";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue