diff options
author | Paladox <thomasmulhall410@yahoo.com> | 2023-06-20 22:48:18 +0000 |
---|---|---|
committer | Paladox <thomasmulhall410@yahoo.com> | 2024-04-17 21:16:15 +0000 |
commit | 369cacd244676d3a39668d17061bf78c1cf7cbbb (patch) | |
tree | 601c0572f5cc4ded8b772eee3646b92065659c98 /includes/libs/filebackend/SwiftFileBackend.php | |
parent | ed2ff58c28788b67bb1c56a0615bd0ea08747e01 (diff) | |
download | mediawikicore-369cacd244676d3a39668d17061bf78c1cf7cbbb.tar.gz mediawikicore-369cacd244676d3a39668d17061bf78c1cf7cbbb.zip |
Allow to set .rlistings on a container
Needed for if you use large objects and you access the url anonymously.
Change-Id: I9aa384f525b0747793bba0c0691cc36b6369ed9b
Diffstat (limited to 'includes/libs/filebackend/SwiftFileBackend.php')
-rw-r--r-- | includes/libs/filebackend/SwiftFileBackend.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/includes/libs/filebackend/SwiftFileBackend.php b/includes/libs/filebackend/SwiftFileBackend.php index c6149edc9c5e..5404f4454181 100644 --- a/includes/libs/filebackend/SwiftFileBackend.php +++ b/includes/libs/filebackend/SwiftFileBackend.php @@ -699,10 +699,16 @@ class SwiftFileBackend extends FileBackendStore { protected function doPublishInternal( $fullCont, $dir, array $params ) { $status = $this->newStatus(); + if ( empty( $params['access'] ) ) { + return $status; // nothing to do + } $stat = $this->getContainerStat( $fullCont ); if ( is_array( $stat ) ) { $readUsers = array_merge( $this->readUsers, [ $this->swiftUser, '.r:*' ] ); + if ( !empty( $params['listing'] ) ) { + array_push( $readUsers, '.rlistings' ); + } $writeUsers = array_merge( $this->writeUsers, [ $this->swiftUser ] ); // Make container public to end-users... @@ -1495,6 +1501,9 @@ class SwiftFileBackend extends FileBackendStore { if ( empty( $params['noAccess'] ) ) { // public $readUsers = array_merge( $this->readUsers, [ '.r:*', $this->swiftUser ] ); + if ( empty( $params['noListing'] ) ) { + array_push( $readUsers, '.rlistings' ); + } $writeUsers = array_merge( $this->writeUsers, [ $this->swiftUser ] ); } else { // private |