##// END OF EJS Templates
api: fixed recursive permissions changes to repo group....
marcink -
r2856:2094102a stable
parent child Browse files
Show More
@@ -54,6 +54,8 b' class TestGrantUserGroupPermissionFromRe'
54 self, name, perm, apply_to_children, user_util):
54 self, name, perm, apply_to_children, user_util):
55 user_group = user_util.create_user_group()
55 user_group = user_util.create_user_group()
56 repo_group = user_util.create_repo_group()
56 repo_group = user_util.create_repo_group()
57 user_util.create_repo(parent=repo_group)
58
57 id_, params = build_data(
59 id_, params = build_data(
58 self.apikey,
60 self.apikey,
59 'grant_user_group_permission_to_repo_group',
61 'grant_user_group_permission_to_repo_group',
@@ -451,7 +451,7 b' def grant_user_permission_to_repo_group('
451 perm = get_perm_or_error(perm, prefix='group.')
451 perm = get_perm_or_error(perm, prefix='group.')
452 apply_to_children = Optional.extract(apply_to_children)
452 apply_to_children = Optional.extract(apply_to_children)
453
453
454 perm_additions = [[user.user_id, perm, "user"]]
454 perm_additions = [[user.user_id, perm.permission_name, "user"]]
455 try:
455 try:
456 RepoGroupModel().update_permissions(repo_group=repo_group,
456 RepoGroupModel().update_permissions(repo_group=repo_group,
457 perm_additions=perm_additions,
457 perm_additions=perm_additions,
@@ -609,7 +609,7 b' def grant_user_group_permission_to_repo_'
609
609
610 apply_to_children = Optional.extract(apply_to_children)
610 apply_to_children = Optional.extract(apply_to_children)
611
611
612 perm_additions = [[user_group.users_group_id, perm, "user_group"]]
612 perm_additions = [[user_group.users_group_id, perm.permission_name, "user_group"]]
613 try:
613 try:
614 RepoGroupModel().update_permissions(repo_group=repo_group,
614 RepoGroupModel().update_permissions(repo_group=repo_group,
615 perm_additions=perm_additions,
615 perm_additions=perm_additions,
General Comments 0
You need to be logged in to leave comments. Login now