aboutsummaryrefslogtreecommitdiff
path: root/rhodecode/model
diff options
context:
space:
mode:
authorMarcin Kuzminski <marcin@python-works.com>2013-01-25 00:30:25 +0100
committerMarcin Kuzminski <marcin@python-works.com>2013-01-25 00:30:25 +0100
commitc7f4048b45780853642dfab24b7efc1708504359 (patch)
treeab11910809f4577c431b9df0f8524eeea2386d87 /rhodecode/model
parent3000f2b6783cb1257b3b4f03359b0fa6e392a1bb (diff)
recursive mode of setting permission should skip private repositories, they should remain private, it's proper thing to do !
--HG-- extra : source : dd0ee9119aa9c24c0df380049012278482542885
Diffstat (limited to 'rhodecode/model')
-rw-r--r--rhodecode/model/repos_group.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/rhodecode/model/repos_group.py b/rhodecode/model/repos_group.py
index d4162b39..a914fad0 100644
--- a/rhodecode/model/repos_group.py
+++ b/rhodecode/model/repos_group.py
@@ -175,6 +175,10 @@ class ReposGroupModel(BaseModel):
repos_group=obj, user=user, perm=perm
)
elif isinstance(obj, Repository):
+ #we do this ONLY IF repository is non-private
+ if obj.private:
+ return
+
# we set group permission but we have to switch to repo
# permission
perm = perm.replace('group.', 'repository.')
@@ -199,6 +203,7 @@ class ReposGroupModel(BaseModel):
% (repos_group, recursive))
for obj in repos_group.recursive_groups_and_repos():
+ #obj is an instance of a group or repositories in that group
if not recursive:
obj = repos_group