Show More
@@ -34,6 +34,7 from rhodecode.lib.auth import PasswordG | |||||
34 | HasPermissionAllDecorator, HasPermissionAnyDecorator, \ |
|
34 | HasPermissionAllDecorator, HasPermissionAnyDecorator, \ | |
35 | HasPermissionAnyApi, HasRepoPermissionAnyApi |
|
35 | HasPermissionAnyApi, HasRepoPermissionAnyApi | |
36 | from rhodecode.lib.utils import map_groups, repo2db_mapper |
|
36 | from rhodecode.lib.utils import map_groups, repo2db_mapper | |
|
37 | from rhodecode.lib.utils2 import str2bool | |||
37 | from rhodecode.model.meta import Session |
|
38 | from rhodecode.model.meta import Session | |
38 | from rhodecode.model.scm import ScmModel |
|
39 | from rhodecode.model.scm import ScmModel | |
39 | from rhodecode.model.repo import RepoModel |
|
40 | from rhodecode.model.repo import RepoModel | |
@@ -257,7 +258,7 class ApiController(JSONRPCController): | |||||
257 | if isinstance(userid, Optional): |
|
258 | if isinstance(userid, Optional): | |
258 | userid = apiuser.user_id |
|
259 | userid = apiuser.user_id | |
259 | user = get_user_or_error(userid) |
|
260 | user = get_user_or_error(userid) | |
260 | locked = bool(locked) |
|
261 | locked = str2bool(locked) | |
261 | try: |
|
262 | try: | |
262 | if locked: |
|
263 | if locked: | |
263 | Repository.lock(repo, user.user_id) |
|
264 | Repository.lock(repo, user.user_id) |
General Comments 0
You need to be logged in to leave comments.
Login now