##// END OF EJS Templates
pep8: cleanup code for permissions
marcink -
r2078:b7b80022 default
parent child Browse files
Show More
@@ -48,7 +48,7 b' class RepositoryPermissionModel(BaseMode'
48 permission = Permission.get_by_key(permission)
48 permission = Permission.get_by_key(permission)
49 current = self.get_user_permission(repository, user)
49 current = self.get_user_permission(repository, user)
50 if current:
50 if current:
51 if not current.permission is permission:
51 if current.permission is not permission:
52 current.permission = permission
52 current.permission = permission
53 else:
53 else:
54 p = UserRepoToPerm()
54 p = UserRepoToPerm()
@@ -73,7 +73,7 b' class RepositoryPermissionModel(BaseMode'
73 permission = Permission.get_by_key(permission)
73 permission = Permission.get_by_key(permission)
74 current = self.get_users_group_permission(repository, users_group)
74 current = self.get_users_group_permission(repository, users_group)
75 if current:
75 if current:
76 if not current.permission is permission:
76 if current.permission is not permission:
77 current.permission = permission
77 current.permission = permission
78 else:
78 else:
79 p = UserGroupRepoToPerm()
79 p = UserGroupRepoToPerm()
@@ -93,10 +93,10 b' class RepositoryPermissionModel(BaseMode'
93 else:
93 else:
94 self.delete_user_permission(repository, user)
94 self.delete_user_permission(repository, user)
95
95
96 def update_or_delete_users_group_permission(self, repository, user_group,
96 def update_or_delete_users_group_permission(
97 permission):
97 self, repository, user_group, permission):
98 if permission:
98 if permission:
99 self.update_user_group_permission(repository, user_group,
99 self.update_user_group_permission(
100 permission)
100 repository, user_group, permission)
101 else:
101 else:
102 self.delete_users_group_permission(repository, user_group)
102 self.delete_users_group_permission(repository, user_group)
General Comments 0
You need to be logged in to leave comments. Login now