Revision b0a2d1a6 pithos/api/util.py
b/pithos/api/util.py | ||
---|---|---|
378 | 378 |
return ret |
379 | 379 |
for perm in (x for x in permissions.split(';')): |
380 | 380 |
if perm.startswith('read='): |
381 |
ret['read'] = [v.replace(' ','').lower() for v in perm[5:].split(',')]
|
|
381 |
ret['read'] = list(set([v.replace(' ','').lower() for v in perm[5:].split(',')]))
|
|
382 | 382 |
if '' in ret['read']: |
383 | 383 |
ret['read'].remove('') |
384 | 384 |
if '*' in ret['read']: |
... | ... | |
386 | 386 |
if len(ret['read']) == 0: |
387 | 387 |
raise BadRequest('Bad X-Object-Sharing header value') |
388 | 388 |
elif perm.startswith('write='): |
389 |
ret['write'] = [v.replace(' ','').lower() for v in perm[6:].split(',')]
|
|
389 |
ret['write'] = list(set([v.replace(' ','').lower() for v in perm[6:].split(',')]))
|
|
390 | 390 |
if '' in ret['write']: |
391 | 391 |
ret['write'].remove('') |
392 | 392 |
if '*' in ret['write']: |
Also available in: Unified diff