Show More
@@ -18,7 +18,6 b'' | |||
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | import inspect | |
|
22 | 21 | import itertools |
|
23 | 22 | import logging |
|
24 | 23 | import sys |
@@ -186,10 +185,12 b' def request_view(request):' | |||
|
186 | 185 | Main request handling method. It handles all logic to call a specific |
|
187 | 186 | exposed method |
|
188 | 187 | """ |
|
188 | # cython compatible inspect | |
|
189 | from rhodecode.config.patches import inspect_getargspec | |
|
190 | inspect = inspect_getargspec() | |
|
189 | 191 | |
|
190 | 192 | # check if we can find this session using api_key, get_by_auth_token |
|
191 | 193 | # search not expired tokens only |
|
192 | ||
|
193 | 194 | try: |
|
194 | 195 | api_user = User.get_by_auth_token(request.rpc_api_key) |
|
195 | 196 |
@@ -18,7 +18,6 b'' | |||
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | import inspect | |
|
22 | 21 | import logging |
|
23 | 22 | import itertools |
|
24 | 23 | import base64 |
@@ -334,6 +333,9 b' def get_method(request, apiuser, pattern' | |||
|
334 | 333 | ] |
|
335 | 334 | error : null |
|
336 | 335 | """ |
|
336 | from rhodecode.config.patches import inspect_getargspec | |
|
337 | inspect = inspect_getargspec() | |
|
338 | ||
|
337 | 339 | if not has_superadmin_permission(apiuser): |
|
338 | 340 | raise JSONRPCForbidden() |
|
339 | 341 |
@@ -95,3 +95,5 b' def inspect_getargspec():' | |||
|
95 | 95 | return inspect.ArgSpec(args, varargs, varkw, func.func_defaults) |
|
96 | 96 | |
|
97 | 97 | inspect.getargspec = custom_getargspec |
|
98 | ||
|
99 | return inspect |
@@ -24,7 +24,6 b' authentication and permission libraries' | |||
|
24 | 24 | |
|
25 | 25 | import os |
|
26 | 26 | import time |
|
27 | import inspect | |
|
28 | 27 | import collections |
|
29 | 28 | import fnmatch |
|
30 | 29 | import hashlib |
@@ -2013,6 +2012,7 b' class PermsFunction(object):' | |||
|
2013 | 2012 | self.user_group_name = None |
|
2014 | 2013 | |
|
2015 | 2014 | def __bool__(self): |
|
2015 | import inspect | |
|
2016 | 2016 | frame = inspect.currentframe() |
|
2017 | 2017 | stack_trace = traceback.format_stack(frame) |
|
2018 | 2018 | log.error('Checking bool value on a class instance of perm ' |
General Comments 0
You need to be logged in to leave comments.
Login now