Secondary Google account (part5)
This commit is contained in:
parent
624a617102
commit
8a3075ee80
@ -153,9 +153,8 @@ define([
|
|||||||
var immediate;
|
var immediate;
|
||||||
function localAuthenticate() {
|
function localAuthenticate() {
|
||||||
if(authuser > 5) {
|
if(authuser > 5) {
|
||||||
authuser = 0;
|
task.error(new Error('Unable to authenticate user ' + authorizationMgr.getUserId() + ', please sign in with Google.'));
|
||||||
immediate = false;
|
return;
|
||||||
eventMgr.onError('Unable to authenticate user ' + authorizationMgr.getUserId() + ', please use login form.');
|
|
||||||
}
|
}
|
||||||
if(immediate === false) {
|
if(immediate === false) {
|
||||||
task.timeout = constants.ASYNC_TASK_LONG_TIMEOUT;
|
task.timeout = constants.ASYNC_TASK_LONG_TIMEOUT;
|
||||||
@ -748,6 +747,7 @@ define([
|
|||||||
var view;
|
var view;
|
||||||
if(pickerType == 'doc') {
|
if(pickerType == 'doc') {
|
||||||
view = new google.picker.DocsView(google.picker.ViewId.DOCS);
|
view = new google.picker.DocsView(google.picker.ViewId.DOCS);
|
||||||
|
view.setParent('root');
|
||||||
view.setIncludeFolders(true);
|
view.setIncludeFolders(true);
|
||||||
view.setMimeTypes([
|
view.setMimeTypes([
|
||||||
"text/x-markdown",
|
"text/x-markdown",
|
||||||
@ -762,6 +762,7 @@ define([
|
|||||||
}
|
}
|
||||||
else if(pickerType == 'folder') {
|
else if(pickerType == 'folder') {
|
||||||
view = new google.picker.DocsView(google.picker.ViewId.FOLDERS);
|
view = new google.picker.DocsView(google.picker.ViewId.FOLDERS);
|
||||||
|
view.setParent('root');
|
||||||
view.setIncludeFolders(true);
|
view.setIncludeFolders(true);
|
||||||
view.setSelectFolderEnabled(true);
|
view.setSelectFolderEnabled(true);
|
||||||
view.setMimeTypes('application/vnd.google-apps.folder');
|
view.setMimeTypes('application/vnd.google-apps.folder');
|
||||||
|
@ -508,7 +508,7 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
var state = utils.retrieveIgnoreError(providerId + ".state");
|
var state = utils.retrieveIgnoreError(providerId + ".state");
|
||||||
if(state === undefined) {
|
if(state === undefined || state.userId != storage[accountId + '.userId']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
storage.removeItem(providerId + ".state");
|
storage.removeItem(providerId + ".state");
|
||||||
|
Loading…
Reference in New Issue
Block a user