Revision b3102a96

b/snf-pithos-app/pithos/api/util.py
950 950

  
951 951
    return 'text'
952 952

  
953
def User(unicode):
953
class User(unicode):
954 954
    pass
955 955

  
956 956
def api_method(http_method=None, format_allowed=False, user_required=True):
......
973 973
                             AUTHENTICATION_URL, AUTHENTICATION_USERS, token)
974 974
                    if  getattr(request, 'user', None) is None:
975 975
                        raise Unauthorized('Access denied')
976
                    assert request.get('uniq') != None
977
                    request.user_uniq = User(request.get('uniq'))
976
                    assert getattr(request, 'user_uniq', None) != None
977
                    request.user_uniq = User(request.user_uniq)
978 978
                    request.user_uniq.id = request.user.get('id')
979
                    assert request.user_uniq.id != None
980 979
                
981 980
                # The args variable may contain up to (account, container, object).
982 981
                if len(args) > 1 and len(args[1]) > 256:

Also available in: Unified diff