Revision c8860319 snf-pithos-app/pithos/api/functions.py
b/snf-pithos-app/pithos/api/functions.py | ||
---|---|---|
376 | 376 |
shared = False |
377 | 377 |
if 'shared' in request.GET: |
378 | 378 |
shared = True |
379 |
public = False |
|
380 |
if request.user_uniq == v_account and 'public' in request.GET: |
|
381 |
public = True |
|
379 |
|
|
380 |
public_requested = 'public' in request.GET |
|
381 |
public_granted = public_requested and request.user_uniq == v_account |
|
382 |
|
|
383 |
if public_requested and not public_granted: |
|
384 |
raise faults.Forbidden( |
|
385 |
'PUblic container listing is not allowed to non path owners') |
|
382 | 386 |
|
383 | 387 |
try: |
384 | 388 |
containers = request.backend.list_containers( |
385 | 389 |
request.user_uniq, v_account, |
386 |
marker, limit, shared, until, public) |
|
390 |
marker, limit, shared, until, public_granted)
|
|
387 | 391 |
except NotAllowedError: |
388 | 392 |
raise faults.Forbidden('Not allowed') |
389 | 393 |
except NameError: |
... | ... | |
662 | 666 |
public_requested = 'public' in request.GET |
663 | 667 |
public_granted = public_requested and request.user_uniq == v_account |
664 | 668 |
|
669 |
if public_requested and not public_granted: |
|
670 |
raise faults.Forbidden( |
|
671 |
'PUblic object listing is not allowed to non path owners') |
|
672 |
|
|
665 | 673 |
if request.serialization == 'text': |
666 | 674 |
try: |
667 | 675 |
objects = request.backend.list_objects( |
Also available in: Unified diff