-
Notifications
You must be signed in to change notification settings - Fork 645
Groups for ownership *or* GitHub-based permissions #137
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
Comments
Crates is anyway associated with a GH account, perhaps it can ask for those additional permissions? |
Yes I'd definitely love to integrate the teams/organizations aspect of Github a bit more into crates.io for smoother management of these aspects. |
+1 I'm splitting a monolithic crate into a bunch of little ones and this is a headache. |
discussed this more on IRC. Current plans is to tie this 100% to github orgs/teams as a starter, since that's what most of us just want anyway. Proposed syntax: Backend Implementation:
I'm willing to implement but am honestly a bit swamped with school stuff and am not familiar with any of the related codebases or APIs. So basically if I manage to implement it won't be for a while. |
Tight integration with a proprietary code hosting service which may not be around in 10 years seems a bit concerning to me. |
Ownership is entirely a crates.io-side thing -- this will only affect those uploading crates (not using them). If github goes down, we'd just need to introduce a new model of shared ownership. No biggie. |
@SaberUK, this is a fair point, but crates.io already has that integration for logging in. You can not (as far as I understand) upload a crate without a GitHub account. And as Manish says, that can always change later. |
@SimonSapin while that is true, it sounds more like that is an unnecessary limitation on crates.io's part. And what about people using Gitorious, Bitbucket or GitLab for managing their code? |
That's a separate discussion. Nobody's saying that we can't add more authentication methods or grouping methods in the future. And IIRC you don't need your code to be on GitHub to upload it to Crates. You only need a GitHub account for authentication; and we're proposing that Crates can import groups from GitHub, but that's it. This is additional functionality, not a limitation. |
Aha, I see. To me, it sounded like it'd be a tight integration with GitHub right off the bat. Then indeed my issue is unrelated to this. |
good job |
@alexcrichton Is there a timeline for this feature? As we stabilize and move more Servo submodules onto crates.io we run into this more and more. cc @Ms2ger |
@larsbergstrom unfortunately this currently isn't slated to be implemented any time soon |
FWIW, the github integration is as easy as fetching |
I have been thinking about this as we get ready to ramp up "official rust-lang crates" as a thing. I think it might make ownership teams part of a crate's public interface. In particular, this could be used to partially resolve the desire for "official" and "namespaced" crates. For instance, say We could also potentially support searching for team:rust-lang or something. |
@gankro That is a really sweet idea, I like it! Here is my mock-up for your idea :) |
I've picked up the implementation yet again -- sorry the Nomicon and Working out the details it's a bit more complicated than my initial description made it seem for implementation and policy reasons. In particular I think a meaningful distinction should be made between named and team owners. Some thoughts:
|
Murphy's law says that it's unstable :) |
I would personally hope that the id of a team is stable throughout possible renamings of the team, that... seems like it's the purpose of the id! |
Another concern: teams should probably have a normalized name (casing) to avoid bizarre behaviour where Github normalizes and we don't. e.g. Unfortunately normalization also seems unspecified (looks like ASCII case insensitivity). I wonder if I should just try to contact Github for details (this is impossible to google, you just get random projects on Github). |
This already happens with user names: @SimonSapin and @SimonSapin both refer to me, but This kind of security issue happened to Spotify: https://labs.spotify.com/2013/06/18/creative-usernames/ Therefore I am in favor of not trying to do any normalization on crates.io, even if GitHub does. (All identifiers seem to be ASCII-only on GitHub, so the issue is not as subtle as with Spotify.) |
#177 is my initial implementation of this feature, but there's one major snag (I think). crates.io currently requests no perms from Github (it doesn't actually talk to Github at all except to log you in to the site), but you need the |
As Gankro:
As FlashCat:
does that
updates toml
changes to Gankro
😎 |
Add in #177, I'll probably deploy tomorrow |
Is there some docs on how #177 works? |
I'll try to write something up soon, gotta deploy it first... |
Alright, thank you and @gankro! |
@alexcrichton I can write it up if you point me at where you want it. |
And |
We (the Servo team) want to publish more of our libraries on crates.io. One thing this implies is dealing with crates ownership: who can publish new versions. Currently, AFAIU, we have to add or remove permissions for individual people for individual crates. Compare with GitHub where we have "teams" where people participate, and teams has a whole have push access to repositories. This is much easier to manage when the number of people and/or repositories/crates grows.
It would help us if cartes.io had "groups" or "teams" or something like it, to manage crates ownership.
Alternatively, I was going to suggest deferring permission management to GitHub: if a crate name is associated with a repository, anyone with permission to push to that repo can also publish a new version. Unfortunately, that part of the GitHub API seems not to be public:
The text was updated successfully, but these errors were encountered: