Syncing and password storage

Hi,

is it possible to sync (metadata to zotero.org, files to a private WebDAV account) without having to store the passwords in the browser? I would like to avoid having to store the password for my WebDAV account on my PC at work. What I would like to do is sync manually and be asked for my password whenever I sync. As far as I can tell, Zotero won't start to synchronize files when there is no password stored for the account. Am I overlooking something or is this simply not possible?

For the record: I'm running Firefox 24.8.0 and Zotero 4.0.22 on Scientific Linux 6.5.

Best wishes,
Arnd
  • No, sorry, that's not possible. You'd have to patch the code to prompt for a WebDAV password at sync time if one weren't provided. If you want to try that I could give you a couple pointers of where to look in the code.
  • Thank you for your quick response.

    I've got next to no experience in JavaScript, let alone in Firefox plugin development. Do you think this will be a major modification? I've briefly glanced over the code and found zotero/chrome/content/zotero/xpcom/storage/webdav.js, which seems to contain the WebDAV backend. So far, I have no idea where the front-end part would go and how much you actually need to implement for this.
  • webdav.js is the backend code, but since this is just a hack you can just show a prompt from there:

    https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIPromptService#promptPassword_example

    You can try putting that within init(), triggering when there's no password, though it's possible that could trigger at some undesirable times. You'll certainly want to turn off auto-sync.

    I think using null for the first argument and having it find the front-most window itself will work. If not, you'd want to use nsIWindowMediator.getMostRecentWindow('navigator:browser').
Sign In or Register to comment.