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