Issue #19: create repository group for each user
|Created on:||2014-08-18 15:55|
|Updated on:||2014-09-24 11:19|
I suggest to add an option that when activated automatically creates a repository group for each user. This would make kallithea more like github/bitbucket.
I implemented a rudimentary solution for my old rhodecode instance with rcextension
def _cruserhook(*args, **kwargs): from rhodecode.model.repos_group import ReposGroupModel new_group = ReposGroupModel().create(group_name=kwargs['username'], group_description='personal repo group for %s' % kwargs['username'], owner=kwargs['user_id'], parent='users') return 0
Comment by Mads Kiilerich, on 2014-08-18 16:15
I agree ... even though Kallithea fits a different and decentralized model where it is more like each person / organization has their own installation.
It should be optional / permissions should default to off.
It should be configurable with a prefix - organizations will probably want names like ~username or /home/username or /user or /personal or /private so it doesn't clobber the "main" repositories.
Creation should perhaps be postponed to the moment where the user decides to do it or when cloning a repo to it.
Comment by Ba Manzi, on 2014-09-24 11:19
It seems that on kallithea-0.1, the code should be:
def _cruserhook(*args, **kwargs): from kallithea.model.repo_group import RepoGroupModel import pdb pdb.set_trace() new_group = RepoGroupModel().create(group_name=kwargs['username'], group_description='personal repo group for %s' % kwargs['username'], owner=kwargs['username'], parent='users') return 0
kallithea thing, two changes needed:
RepoGroupModel(note the s)
owner=kwargs['user_id']won't work. as
Comment by Mads Kiilerich, on 2015-04-20 13:37
#114 was marked as a duplicate of this issue.