Commit de1fe6b9 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Fix pithos api_method

parent 02515399
......@@ -950,7 +950,7 @@ def request_serialization(request, format_allowed=False):
return 'text'
def User(unicode):
class User(unicode):
pass
def api_method(http_method=None, format_allowed=False, user_required=True):
......@@ -973,10 +973,9 @@ def api_method(http_method=None, format_allowed=False, user_required=True):
AUTHENTICATION_URL, AUTHENTICATION_USERS, token)
if getattr(request, 'user', None) is None:
raise Unauthorized('Access denied')
assert request.get('uniq') != None
request.user_uniq = User(request.get('uniq'))
assert getattr(request, 'user_uniq', None) != None
request.user_uniq = User(request.user_uniq)
request.user_uniq.id = request.user.get('id')
assert request.user_uniq.id != None
# The args variable may contain up to (account, container, object).
if len(args) > 1 and len(args[1]) > 256:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment