Ask for token when importing document from Google+. Fixes #353
This commit is contained in:
parent
17f5275c28
commit
d445ccfec8
@ -755,6 +755,10 @@ define([
|
|||||||
if(pickerType == 'doc' || pickerType == 'folder') {
|
if(pickerType == 'doc' || pickerType == 'folder') {
|
||||||
authenticate(task, 'gdrive', accountId);
|
authenticate(task, 'gdrive', accountId);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
accountId = 'google.picasa0';
|
||||||
|
authenticate(task, 'picasa', accountId);
|
||||||
|
}
|
||||||
loadPicker(task);
|
loadPicker(task);
|
||||||
task.onRun(function() {
|
task.onRun(function() {
|
||||||
var authorizationMgr = authorizationMgrMap[accountId];
|
var authorizationMgr = authorizationMgrMap[accountId];
|
||||||
@ -794,6 +798,7 @@ define([
|
|||||||
view.setType('ofuser');
|
view.setType('ofuser');
|
||||||
pickerBuilder.addView(view);
|
pickerBuilder.addView(view);
|
||||||
pickerBuilder.addView(google.picker.ViewId.PHOTO_UPLOAD);
|
pickerBuilder.addView(google.picker.ViewId.PHOTO_UPLOAD);
|
||||||
|
authorizationMgr && authorizationMgr.token && pickerBuilder.setOAuthToken(authorizationMgr.token.access_token);
|
||||||
}
|
}
|
||||||
pickerBuilder.setCallback(function(data) {
|
pickerBuilder.setCallback(function(data) {
|
||||||
if(data.action == google.picker.Action.PICKED || data.action == google.picker.Action.CANCEL) {
|
if(data.action == google.picker.Action.PICKED || data.action == google.picker.Action.CANCEL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user