@@ 586-608 (lines=23) @@ | ||
583 | return $status; |
|
584 | } |
|
585 | ||
586 | protected function doSecureInternal( $fullCont, $dir, array $params ) { |
|
587 | $status = $this->newStatus(); |
|
588 | if ( empty( $params['noAccess'] ) ) { |
|
589 | return $status; // nothing to do |
|
590 | } |
|
591 | ||
592 | $stat = $this->getContainerStat( $fullCont ); |
|
593 | if ( is_array( $stat ) ) { |
|
594 | // Make container private to end-users... |
|
595 | $status->merge( $this->setContainerAccess( |
|
596 | $fullCont, |
|
597 | [ $this->swiftUser ], // read |
|
598 | [ $this->swiftUser ] // write |
|
599 | ) ); |
|
600 | } elseif ( $stat === false ) { |
|
601 | $status->fatal( 'backend-fail-usable', $params['dir'] ); |
|
602 | } else { |
|
603 | $status->fatal( 'backend-fail-internal', $this->name ); |
|
604 | $this->logger->error( __METHOD__ . ': cannot get container stat' ); |
|
605 | } |
|
606 | ||
607 | return $status; |
|
608 | } |
|
609 | ||
610 | protected function doPublishInternal( $fullCont, $dir, array $params ) { |
|
611 | $status = $this->newStatus(); |
|
@@ 610-629 (lines=20) @@ | ||
607 | return $status; |
|
608 | } |
|
609 | ||
610 | protected function doPublishInternal( $fullCont, $dir, array $params ) { |
|
611 | $status = $this->newStatus(); |
|
612 | ||
613 | $stat = $this->getContainerStat( $fullCont ); |
|
614 | if ( is_array( $stat ) ) { |
|
615 | // Make container public to end-users... |
|
616 | $status->merge( $this->setContainerAccess( |
|
617 | $fullCont, |
|
618 | [ $this->swiftUser, '.r:*' ], // read |
|
619 | [ $this->swiftUser ] // write |
|
620 | ) ); |
|
621 | } elseif ( $stat === false ) { |
|
622 | $status->fatal( 'backend-fail-usable', $params['dir'] ); |
|
623 | } else { |
|
624 | $status->fatal( 'backend-fail-internal', $this->name ); |
|
625 | $this->logger->error( __METHOD__ . ': cannot get container stat' ); |
|
626 | } |
|
627 | ||
628 | return $status; |
|
629 | } |
|
630 | ||
631 | protected function doCleanInternal( $fullCont, $dir, array $params ) { |
|
632 | $status = $this->newStatus(); |