summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-18 11:14:57 +0100
committerErik Johnston <erik@matrix.org>2014-08-18 11:14:57 +0100
commit1c2caacd67d5c00fe96c302749e30da3dc4a213f (patch)
tree4ce4c26aeef0ef31471ce238cbae91e7225bccb1 /webclient/components
parentChange the MemoryDataStore to implement new storage api (diff)
parentwebclient: Tweak namespace of auto-complete directive. ng- should really only... (diff)
downloadsynapse-1c2caacd67d5c00fe96c302749e30da3dc4a213f.tar.xz
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
Diffstat (limited to 'webclient/components')
-rw-r--r--webclient/components/matrix/matrix-service.js19
1 files changed, 14 insertions, 5 deletions
diff --git a/webclient/components/matrix/matrix-service.js b/webclient/components/matrix/matrix-service.js

index 0cc85db28e..c52c94c310 100644 --- a/webclient/components/matrix/matrix-service.js +++ b/webclient/components/matrix/matrix-service.js
@@ -318,12 +318,21 @@ angular.module('matrixService', []) }; return doRequest("GET", path, params); }, - - // - testLogin: function() { - + + // Indicates if user authentications details are stored in cache + isUserLoggedIn: function() { + var config = this.config(); + + // User is considered logged in if his cache is not empty and contains + // an access token + if (config && config.access_token) { + return true; + } + else { + return false; + } }, - + /****** Permanent storage of user information ******/ // Returns the current config