Secondary Google account (part5)

This commit is contained in:
benweet 2013-12-25 22:14:22 +01:00
parent 624a617102
commit 8a3075ee80
2 changed files with 5 additions and 4 deletions

View File

@ -153,9 +153,8 @@ define([
var immediate;
function localAuthenticate() {
if(authuser > 5) {
authuser = 0;
immediate = false;
eventMgr.onError('Unable to authenticate user ' + authorizationMgr.getUserId() + ', please use login form.');
task.error(new Error('Unable to authenticate user ' + authorizationMgr.getUserId() + ', please sign in with Google.'));
return;
}
if(immediate === false) {
task.timeout = constants.ASYNC_TASK_LONG_TIMEOUT;
@ -748,6 +747,7 @@ define([
var view;
if(pickerType == 'doc') {
view = new google.picker.DocsView(google.picker.ViewId.DOCS);
view.setParent('root');
view.setIncludeFolders(true);
view.setMimeTypes([
"text/x-markdown",
@ -762,6 +762,7 @@ define([
}
else if(pickerType == 'folder') {
view = new google.picker.DocsView(google.picker.ViewId.FOLDERS);
view.setParent('root');
view.setIncludeFolders(true);
view.setSelectFolderEnabled(true);
view.setMimeTypes('application/vnd.google-apps.folder');

View File

@ -508,7 +508,7 @@ define([
});
var state = utils.retrieveIgnoreError(providerId + ".state");
if(state === undefined) {
if(state === undefined || state.userId != storage[accountId + '.userId']) {
return;
}
storage.removeItem(providerId + ".state");