aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Casagrande <milo@ubuntu.com>2013-05-21 14:26:20 +0200
committerMilo Casagrande <milo@ubuntu.com>2013-05-21 14:26:20 +0200
commit2ba20d239c5e2412cc6838d77ace42beb3575c3e (patch)
treec4ce8c1a9c851636f927e18539cea5d5d49ee6d7
parentfdbcd0de4bc70dd35d13a56f3c058e5b20639e45 (diff)
Fixed use of set_guid, create group before renaming old one.
-rw-r--r--rhodecode/model/repos_group.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/rhodecode/model/repos_group.py b/rhodecode/model/repos_group.py
index 0c719275..560b6c4f 100644
--- a/rhodecode/model/repos_group.py
+++ b/rhodecode/model/repos_group.py
@@ -182,7 +182,7 @@ class ReposGroupModel(BaseModel):
# At the end, fix permissions on the repo directories. This is needed
# to make sure other users, part of the same group, can write to the
# repository.
- SystemCommand.fix_permissions(create_path)
+ SystemCommand.set_guid(create_path)
return new_repos_group
except:
@@ -311,13 +311,15 @@ class ReposGroupModel(BaseModel):
new_system_name = "%s-%s" % (
new_path.split(self.URL_SEPARATOR)[-1],
repos_group.group_id)
- SystemCommand.rename_group(old_system_name, new_system_name)
if new_system_name not in SystemCommand.get_system_groups():
SystemCommand.add_group(new_system_name)
SystemCommand.change_ownership(repos_group.group_name,
new_system_name)
+ if new_system_name != old_system_name:
+ SystemCommand.rename_group(old_system_name, new_system_name)
+
return repos_group
except:
log.error(traceback.format_exc())
@@ -429,7 +431,7 @@ class ReposGroupModel(BaseModel):
# At the end, fix permissions on the repo directories. This is needed
# to make sure other users, part of the same group, can write to the
# repository.
- SystemCommand.fix_permissions(group_path)
+ SystemCommand.set_guid(group_path)
def revoke_user_permission(self, repos_group, user):
"""