Show More
@@ -48,7 +48,7 b' class RepositoryPermissionModel(BaseMode' | |||
|
48 | 48 | permission = Permission.get_by_key(permission) |
|
49 | 49 | current = self.get_user_permission(repository, user) |
|
50 | 50 | if current: |
|
51 |
if |
|
|
51 | if current.permission is not permission: | |
|
52 | 52 | current.permission = permission |
|
53 | 53 | else: |
|
54 | 54 | p = UserRepoToPerm() |
@@ -73,7 +73,7 b' class RepositoryPermissionModel(BaseMode' | |||
|
73 | 73 | permission = Permission.get_by_key(permission) |
|
74 | 74 | current = self.get_users_group_permission(repository, users_group) |
|
75 | 75 | if current: |
|
76 |
if |
|
|
76 | if current.permission is not permission: | |
|
77 | 77 | current.permission = permission |
|
78 | 78 | else: |
|
79 | 79 | p = UserGroupRepoToPerm() |
@@ -93,10 +93,10 b' class RepositoryPermissionModel(BaseMode' | |||
|
93 | 93 | else: |
|
94 | 94 | self.delete_user_permission(repository, user) |
|
95 | 95 | |
|
96 |
def update_or_delete_users_group_permission( |
|
|
97 | permission): | |
|
96 | def update_or_delete_users_group_permission( | |
|
97 | self, repository, user_group, permission): | |
|
98 | 98 | if permission: |
|
99 |
self.update_user_group_permission( |
|
|
100 | permission) | |
|
99 | self.update_user_group_permission( | |
|
100 | repository, user_group, permission) | |
|
101 | 101 | else: |
|
102 | 102 | self.delete_users_group_permission(repository, user_group) |
General Comments 0
You need to be logged in to leave comments.
Login now