-
-
Notifications
You must be signed in to change notification settings - Fork 927
The Owner Problem
Managing owners for gems sucks right now. Let’s fix it. One important note to remember here: the solution should be extensible for subdomains as well.
Related ML posts:
Managing gem owners
Manage owners on the site?
Just a simple has_many through system:
class User < ActiveRecord::Base has_many :ownerships has_many :rubygems, :through => :ownerships end class Ownership < ActiveRecord::Base belongs_to :user belongs_to :rubygem end class Rubygem < ActiveRecord::Base has_many :owners, :through => :ownerships, :source => :user has_many :ownerships end
Create a Group model that has_many
Users. Essentially acts as an ACL. Possibly promote one user as a “Manager” or “Admin” of the list. Users can then create arbitrary groups for each Rubygem or Subdomain.
Feel free to add your thoughts/idea here (or above) —@qrush
I know you said that the current setup sucks, are there some concrete reasons why? — @jbarnette
Why not just delegate user and owner management to Github? Simply use Github login and request oauth scope to read all the organizations a user belongs to, then provide a select box to let the user choose whichever Github organization a gem belongs to.
As an added bonus, if the gemspec has a link to its GitHub repo, set the gem owner to the Github repo owner automatically by default as long as the user is a member of the owner organization. 100% zero config groups.
— @goofrider 2014.06.30