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

attempt to deal with variable access to buckets #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

petermao
Copy link

s3ed always errors out if s3:// is the only thing in the minibuffer, or if I don't have access to the bucket in question.

This is an attempt (though not pretty) to get around that limitation. If the current buffer is not an s3ed buffer, then instead of prepping the s3ed-completing-read with a bare s3://, I've inserted a completing-read to set current-s3-base-path from choices from s3ed-bucket-list.

Another way to deal with this is to change s3ed-completing-read to catch the "AccessDenied" errors.

In case the user only has access to specific buckets, this variable may be
customized.
A single prefix was too restrictive.  This change introduces
`s3ed-bucket-list', a list of buckets that one has access to (default empty
list).

Use M-n/p to access contents of the list.

The implementation is not great.  Elements of the list are presented for
`current-s3-base-path' in `s3ed-find-file' before the `s3ed-completing-read'.
This is to avoid `s3ed-completing-read' from erroring out when an inaccessible
bucket is in the minibuffer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant