aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStevan Radaković <stevan.radakovic@linaro.org>2013-04-02 14:24:42 +0200
committerStevan Radaković <stevan.radakovic@linaro.org>2013-04-02 14:24:42 +0200
commit7dd81d912e5ae857ee26225878426e2907a6eed0 (patch)
treec52f5738620f656c342d35ce3ab41a12d80880a5
parent3e0acaf56c8b8a3345ec65bb65532e2e52fbeec3 (diff)
downloadrhodecode-ldap.tar.gz
Small permission fix for repository ACL.ldap
-rw-r--r--rhodecode/model/repo.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/rhodecode/model/repo.py b/rhodecode/model/repo.py
index 910c5d2..74efadf 100644
--- a/rhodecode/model/repo.py
+++ b/rhodecode/model/repo.py
@@ -522,7 +522,8 @@ class RepoModel(BaseModel):
repo.repo_name.split(self.URL_SEPARATOR)[-1],
repo.repo_id)
repo_path = os.path.join(self.repos_path, repo.repo_name)
- if permission.permission_name in ["group.none", "group.read"]:
+ if permission.permission_name in ["repository.none",
+ "repository.read"]:
if user.username=="default":
os.chmod(repo_path, 0775)
else:
@@ -592,13 +593,14 @@ class RepoModel(BaseModel):
system_group_name = "%s-%s" % (
repo.repo_name.split(self.URL_SEPARATOR)[-1],
repo.repo_id)
- for user in group_name.members:
- if permission.permission_name in ["group.none", "group.read"]:
+ for member in group_name.members:
+ if permission.permission_name in ["repository.none",
+ "repository.read"]:
SystemCommand.remove_user_from_group(system_group_name,
- user.username)
+ member.user.username)
else:
SystemCommand.add_user_to_group(system_group_name,
- user.username)
+ member.user.username)
def revoke_users_group_permission(self, repo, group_name):
"""
@@ -622,9 +624,9 @@ class RepoModel(BaseModel):
system_group_name = "%s-%s" % (
repo.repo_name.split(self.URL_SEPARATOR)[-1],
repo.repo_id)
- for user in group_name.members:
+ for member in group_name.members:
SystemCommand.remove_user_from_group(system_group_name,
- user.username)
+ member.user.username)
def delete_stats(self, repo_name):
"""