1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 07:39:43 +02:00

Improved secure mode viewing

Co-Authored-By: McMatts <matt@documize.com>
This commit is contained in:
Harvey Kandola 2018-10-05 17:42:06 +01:00
parent ab2cbd4ff7
commit df0e3c108e
3 changed files with 5 additions and 10 deletions

View file

@ -35,7 +35,7 @@ export default SimpleAuthSession.extend({
}),
user: computed('isAuthenticated', 'session.content.authenticated.user', function () {
if (this.get('isAuthenticated')) {
if (this.get('isAuthenticated') && !this.get('appMeta.secureMode')) {
let user = this.get('session.content.authenticated.user') || { id: '0' };
let data = this.get('store').normalize('user', user);
let um = this.get('store').push(data)
@ -45,7 +45,7 @@ export default SimpleAuthSession.extend({
}),
authenticated: computed('session.content.authenticated.user', function () {
if (is.null(this.get('session.authenticator'))) return false;
if (is.null(this.get('session.authenticator')) || this.get('appMeta.secureMode')) return false;
return this.get('session.authenticator') !== 'authenticator:anonymous' && this.get('session.content.authenticated.user.id') !== '0';
}),