Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When to raise credentials dialog? #80

Open
benjamin-heasly opened this issue Oct 7, 2016 · 0 comments
Open

When to raise credentials dialog? #80

benjamin-heasly opened this issue Oct 7, 2016 · 0 comments

Comments

@benjamin-heasly
Copy link
Contributor

@DavidBrainard and I discussed the question of when to raise the credentials dialog. That is, pop up a window and ask for a username and password.

We had some motivations from a user point of view.

If the user has complete credentials (ie both name and password) in their configuration JSON, then we should try not to bother them with a credentials dialog.

But, if the user has read-only credentials, like "guest", and they want to publish data, we might like to raise the credentials dialog anyway, so that they can type in write credentials. This would allow users to temporarily "un-guest" themselves during write operations.

It would be nice if we could ask the server what permissions a user has, like read vs write. Currently we can only ask if credentials are accepted, not what they are good for.

Current behaviors:

  • Raise the dialog when loading configuration in rdtConfiguration(), if there is a non-guest username but no password. Only checks whether credentials look complete, does not ask the server if the credentials are good.
  • Raise the dialog from RdtClient.credentialsDialog(), no matter what.
  • In rdtCredentialsDialog() itself, always raise the dialog at least once. Keep raising the dialog until the server accepts the credentials.
  • rdtPingServer() can check whether the server accepts a user's credentials, but not what permissions they might have.

Possible improvements:

  • Let rdtPingServer() ask for user details, like whether they have read or write permissions for the configured repository.
  • Let rdtCredentialsDialog() check with the server first, before raising the dialog. This would mean rdtCredentialsDialog() might not actually raise a dialog, depending on the configured credentials.
  • Let the behavior of rdtCredentialsDialog() depend on user details like read vs write permission. Perhaps:
    • rdtCredentialsDialog('when', 'always') -- raise dialog no matter what.
    • rdtCredentialsDialog('when', 'reading') -- raise dialog only if user lacks read permissions.
    • rdtCredentialsDialog('when', 'writing') -- raise dialog only if user lacks write permissions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant