##// END OF EJS Templates
tests: fixed some warnings on tests
marcink -
r4009:f55b1af6 default
parent child Browse files
Show More
@@ -280,10 +280,13 b' def branch_permission_setter(request):'
280
280
281 rule_id = None
281 rule_id = None
282 write_perm_id = None
282 write_perm_id = None
283 write_perm = None
284 rule = None
283
285
284 def _branch_permissions_setter(
286 def _branch_permissions_setter(
285 repo_name, username, pattern='*', permission='branch.push_force'):
287 repo_name, username, pattern='*', permission='branch.push_force'):
286 global rule_id, write_perm_id
288 global rule_id, write_perm_id
289 global rule, write_perm
287
290
288 repo = Repository.get_by_repo_name(repo_name)
291 repo = Repository.get_by_repo_name(repo_name)
289 repo_id = repo.repo_id
292 repo_id = repo.repo_id
@@ -293,8 +296,6 b' def branch_permission_setter(request):'
293
296
294 rule_perm_obj = Permission.get_by_key(permission)
297 rule_perm_obj = Permission.get_by_key(permission)
295
298
296 write_perm = None
297
298 # add new entry, based on existing perm entry
299 # add new entry, based on existing perm entry
299 perm = UserRepoToPerm.query() \
300 perm = UserRepoToPerm.query() \
300 .filter(UserRepoToPerm.repository_id == repo_id) \
301 .filter(UserRepoToPerm.repository_id == repo_id) \
@@ -323,8 +324,6 b' def branch_permission_setter(request):'
323 Session().add(rule)
324 Session().add(rule)
324 Session().commit()
325 Session().commit()
325
326
326 global rule, write_perm
327
328 return rule
327 return rule
329
328
330 @request.addfinalizer
329 @request.addfinalizer
General Comments 0
You need to be logged in to leave comments. Login now