diff options
author | Milo Casagrande <milo@ubuntu.com> | 2013-05-23 18:06:00 +0200 |
---|---|---|
committer | Milo Casagrande <milo@ubuntu.com> | 2013-05-23 18:06:00 +0200 |
commit | d72b7dc3b08c54c197dc608ab8f6e782a9f68d48 (patch) | |
tree | 34221bbb621019a582b3cff96739a9ee0fd7669b | |
parent | 056584bad302de6c3bbc0736a86cb8455562ed81 (diff) |
Need to pass along private property, we do not have a repo object.
-rw-r--r-- | rhodecode/model/repo.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rhodecode/model/repo.py b/rhodecode/model/repo.py index 4a7a67b2..1d0ea15d 100644 --- a/rhodecode/model/repo.py +++ b/rhodecode/model/repo.py @@ -443,8 +443,8 @@ class RepoModel(BaseModel): if not just_db: self.__create_repo(repo_name, new_repo.repo_id, repo_type, - repos_group, - clone_uri) + repos_group, clone_uri, + private=new_repo.private) log_create_repository(new_repo.get_dict(), created_by=owner.username) @@ -677,7 +677,7 @@ class RepoModel(BaseModel): raise def __create_repo(self, repo_name, repo_id, alias, parent, - clone_uri=False): + clone_uri=False, private=False): """ makes repository on filesystem. It's group aware means it'll create a repository within a group, and alter the paths accordingly of @@ -729,8 +729,7 @@ class RepoModel(BaseModel): # Old value here was 0775. We need directory to be sgid, in order to # correctly work with git-shell. Value is calculated with values from # the python stat library. - repo = self._get_repo(repo_name) - if repo.private: + if private: os.chmod(repo_path, 02770) else: os.chmod(repo_path, 02775) |