diff options
| author | Gubolin <gubolin@fantasymail.de> | 2014-07-31 11:49:06 +0200 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2014-07-31 11:49:06 +0200 |
| commit | a3d195b69ecc1b2a35699606eed0ed42b0c8a729 (patch) | |
| tree | 5f0532385939dcaaf0f0ad8c888ec6b931aa1a67 | |
| parent | 8362eac883a067e04633190ff98d060d7b627ca2 (diff) | |
| download | snap-a3d195b69ecc1b2a35699606eed0ed42b0c8a729.tar.gz snap-a3d195b69ecc1b2a35699606eed0ed42b0c8a729.zip | |
show error message when an unlogged user accesses the GitHub project list
| -rw-r--r-- | github.js | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -218,8 +218,14 @@ GitHubBackend.prototype.saveProject = function (ide, callBack, errorCall) { GitHubBackend.prototype.getProjectList = function (callBack, errorCall) { var myself = this; - if (myself.gh !== null) { - myself.gh.getUser().getRepos().then( + if (myself.gh !== null){ + var user = myself.gh.getUser(); + + if (user === null) { + errorCall.call(myself, localize('Please login'), 'GitHub'); + } + + user.getRepos().then( function (repos) { var snapProjects = []; |
