Revision 6fe32fb6 snf-pithos-app/pithos/api/functions.py

b/snf-pithos-app/pithos/api/functions.py
375 375
    if 'shared' in request.GET:
376 376
        shared = True
377 377
    public = False
378
    if 'public' in request.GET:
378
    if request.user_uniq == v_account and 'public' in request.GET:
379 379
        public = True
380 380

  
381 381
    try:
......
647 647
    if 'shared' in request.GET:
648 648
        shared = True
649 649
    public = False
650
    if 'public' in request.GET:
650
    if request.user_uniq == v_account and 'public' in request.GET:
651 651
        public = True
652 652

  
653 653
    if request.serialization == 'text':
......
730 730
                update_sharing_meta(request, permissions, v_account,
731 731
                                    v_container, meta['name'], meta)
732 732
            public = object_public.get(meta['name'], None)
733
            if public:
733
            if public and request.user_uniq == v_account:
734 734
                update_public_meta(public, meta)
735 735
            object_meta.append(printable_header_dict(meta))
736 736

  
......
776 776
    update_manifest_meta(request, v_account, meta)
777 777
    update_sharing_meta(
778 778
        request, permissions, v_account, v_container, v_object, meta)
779
    update_public_meta(public, meta)
779
    if request.user_uniq == v_account:
780
        update_public_meta(public, meta)
780 781

  
781 782
    # Evaluate conditions.
782 783
    validate_modification_preconditions(request, meta)
......
851 852
    update_manifest_meta(request, v_account, meta)
852 853
    update_sharing_meta(
853 854
        request, permissions, v_account, v_container, v_object, meta)
854
    update_public_meta(public, meta)
855
    if request.user_uniq == v_account:
856
        update_public_meta(public, meta)
855 857

  
856 858
    # Evaluate conditions.
857 859
    validate_modification_preconditions(request, meta)

Also available in: Unified diff