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

Remove option to delete repository #950

Open
olivierthereaux opened this issue Jul 9, 2019 · 0 comments
Open

Remove option to delete repository #950

olivierthereaux opened this issue Jul 9, 2019 · 0 comments

Comments

@olivierthereaux
Copy link
Contributor

Context

The OAuth flow requests the ability not only to create repositories, but also to delete them.

I originally thought this was due to the coarse granularity of GH permissions (i.e. "if you want write access you get to delete too") but that is not the case: the app specifically requests for delete permissions (see app/views/datasets/_dataset.html.erb):

Rails.application.config.middleware.use OmniAuth::Builder do provider :github, ENV['GITHUB_KEY'], ENV['GITHUB_SECRET'], scope: "user:email,repo,delete_repo,read:org" end

Issue

This is a pretty steep demand on the trust of the users, especially those who may only want to try out the service. We have received a few messages to that effect in the past.

Suggested change

We could remove the ability to delete repositories. That would impact the ability to "delete a dataset" (see spec/controllers/datasets/destroy_spec.rb) and the UI would have to give guidance on how the user ought to manually do that from the GH app (see app/views/datasets/_dataset.html.erb) but it is doable and may be a decent workaround.

Alternatives

Issue #187 has been proposed in the past, to experiment with asking for delete permissions only on delete. That issue was never prioritised - partly because deleting repos is a relatively rare instance.

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