Revision 1a3eff62
b/docs/pithos-api-guide.rst | ||
---|---|---|
583 | 583 |
x_object_modified_by The user that committed the object's version |
584 | 584 |
x_object_sharing Object permissions (optional) |
585 | 585 |
x_object_allowed_to Allowed actions on object (optional) |
586 |
x_object_public Object's publicly accessible URI (optional) |
|
586 |
x_object_public Object's publicly accessible URI (optional: present if the object is public and the request user is the object owner) |
|
587 |
|
|
587 | 588 |
========================== ====================================== |
588 | 589 |
|
589 | 590 |
Sharing metadata and last modification timestamp will only be returned if there is no ``until`` parameter defined. |
... | ... | |
787 | 788 |
X-Object-Sharing Object permissions (optional) |
788 | 789 |
X-Object-Shared-By Object inheriting permissions (optional) |
789 | 790 |
X-Object-Allowed-To Allowed actions on object (optional) |
790 |
X-Object-Public Object's publicly accessible URI (optional) |
|
791 |
X-Object-Public Object's publicly accessible URI (optional: present if the object is public and the request user is the object owner)
|
|
791 | 792 |
X-Object-Meta-* Optional user defined metadata |
792 | 793 |
========================== =============================== |
793 | 794 |
|
... | ... | |
884 | 885 |
X-Object-Sharing Object permissions (optional) |
885 | 886 |
X-Object-Shared-By Object inheriting permissions (optional) |
886 | 887 |
X-Object-Allowed-To Allowed actions on object (optional) |
887 |
X-Object-Public Object's publicly accessible URI (optional) |
|
888 |
X-Object-Public Object's publicly accessible URI (optional: present if the object is public and the request user is the object owner)
|
|
888 | 889 |
X-Object-Meta-* Optional user defined metadata |
889 | 890 |
========================== =============================== |
890 | 891 |
|
b/snf-pithos-app/pithos/api/functions.py | ||
---|---|---|
702 | 702 |
request.backend.get_object_permissions( |
703 | 703 |
request.user_uniq, v_account, v_container, object) |
704 | 704 |
|
705 |
if public_granted: |
|
705 |
if request.user_uniq == v_account: |
|
706 |
# Bring public information only if the request user |
|
707 |
# is the object owner |
|
706 | 708 |
for k, v in request.backend.list_object_public( |
707 | 709 |
request.user_uniq, v_account, |
708 | 710 |
v_container, prefix).iteritems(): |
... | ... | |
744 | 746 |
update_sharing_meta(request, permissions, v_account, |
745 | 747 |
v_container, meta['name'], meta) |
746 | 748 |
public_url = object_public.get(meta['name'], None) |
747 |
if public_granted: |
|
749 |
if request.user_uniq == v_account: |
|
750 |
# Return public information only if the request user |
|
751 |
# is the object owner |
|
748 | 752 |
update_public_meta(public_url, meta) |
749 | 753 |
object_meta.append(printable_header_dict(meta)) |
750 | 754 |
|
Also available in: Unified diff